FranckFreiburger / vue-resize-sensor

detect container resizing
MIT License
76 stars 12 forks source link
element event-based onresize resize sensor vuejs2

vue-resize-sensor

detect container resizing.

Example

<template>
  <div>
    <resize-sensor @resize="resize"></resize-sensor>
  </div>
</template>

API

props

initial Boolean

Request an initial size event.

events

@resize Object

A size object { width, height }

Browser support

Same browser support as Vue.js 2

Note

since v2.x, the script is exported as esm.

Credits

Franck Freiburger