Detect DOM element resizing
npm install vue3-resize

Detect DOM element resizing

```
npm install --save vue3-resize
⚠️ You need to include the package CSS:
`js`
import 'vue3-resize/dist/vue3-resize.css'
Then import the package and install it into Vue:
`javascript
// main.js
import { createApp } from 'vue'
import App from './App.vue'
import Vue3Resize from 'vue3-resize'
createApp(App)
.use(Vue3Resize)
.mount('#app')
`
Or:
`javascript
import { createApp } from 'vue'
import App from './App.vue'
import { ResizeObserver } from 'vue3-resize'
const app = createApp(App)
app.component('resize-observer', ResizeObserver)
// or
app.component(ResizeObserver.name, ResizeObserver)
app.mount('#app')
`
`html
`
The plugin should be auto-installed. If not, you can install it manually:
`javascript`
app.use(Vue3Resize)
Or:
`javascript`
Vue.component('resize-observer', Vue3Resize.ResizeObserver)
Add the inside a DOM element and make its position to something other than 'static' (for example 'relative'), so that the observer can fill it.
Listen to the notify event that is fired when the above DOM element is resized.
`html
Hello world!
``
---