Normally Palatable Mango

    vue-size-observer

    0.0.3 • Public • Published

    vue-size-observer

    Resize observer for Vue - A vue component to observe the element size changing that implements by resize-observer-polyfill and inspired from rc-resize-observer.

    Usage

    CodeSandBox demo or run example in Terminal with npm:

    npm install
    npm run serve

    Code example:

    import ResizeObserver from 'vue-size-observer';
     
    export default {
      render() {
        return (
          <ResizeObserver
            onResize={() => {
              console.log('resized!');
            }}
          >
            <textarea />
          </ResizeObserver>,
        )
      }
    }

    API

    Props

    name type default description
    disabled boolean false Disable current observer instance

    Event

    name type default description
    resize ({ width, height, offsetWidth, offsetHeight })=>void -- Trigger resize listener function when child node resized

    license

    MIT

    Install

    npm i vue-size-observer

    DownloadsWeekly Downloads

    19

    Version

    0.0.3

    License

    MIT

    Unpacked Size

    5.23 kB

    Total Files

    3

    Last publish

    Collaborators

    • givingwu