Vue.js 3.0 directive to detect element resize
npm install vue3-resize-directive





Vue directive to detect HTML resize events based on CSS Element Queries with debouncing and throttling capacity.
Forked from the original Vue 2 variant: https://github.com/David-Desmaisons/Vue.resize
The onResize function will be called each time the element resizes with the corresponding HTML element as only argument.
`` * With custom timeout (in ms): * With default timeout (150 ms): * With custom timeout (in ms): - Available through npm: - For Modules // ES5 - #### For javascript
``$3
Use throttle when you need to rate-limit resize events frequency.
* With default timeout (150 ms):HTML
``HTML
``$3
Use debounce when you only need to be notified when resize events ends.HTML
``HTML
``$3
Use this option to receive the resize callback right after the element is mounted on the DOM and visible.HTML
``Installation
js`
npm install vue3-resize-directive --save` js`
// ES6
import resize from 'vue3-resize-directive'
//...
export default {
directives: {
resize,
}
//...
var resize = require('vue3-resize-directive')