# vue-resize-sensor

> detect container resizing

Latest version **2.0.0** (published 2017-11-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-resize-sensor
pnpm add vue-resize-sensor
yarn add vue-resize-sensor
bun add vue-resize-sensor
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2017-11-05 |
| First published | 2017-04-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 74 |
| Author | Franck FREIBURGER |
| Maintainers | franck.freiburger |
| Keywords | vue2, detect, element, resize |

## Links

- npm: https://www.npmjs.com/package/vue-resize-sensor
- Repository: https://github.com/FranckFreiburger/vue-resize-sensor
- Homepage: https://github.com/FranckFreiburger/vue-resize-sensor#readme
- Issues: https://github.com/FranckFreiburger/vue-resize-sensor/issues
- npm.io page: https://npm.io/package/vue-resize-sensor

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2017-11-05
- 1.1.3 — 2017-11-05
- 1.1.2 — 2017-10-19
- 1.1.1 — 2017-04-27
- 1.1.0 — 2017-04-13
- 1.0.5 — 2017-04-12
- 1.0.4 — 2017-04-11
- 1.0.3 — 2017-04-11
- 1.0.2 — 2017-04-11
- 1.0.1 — 2017-04-07
- 1.0.0 — 2017-04-06

## README

# vue-resize-sensor
detect container resizing. 
* event based
* no window.onresize
* no interval/timeout detection
* no CSS modifications
* no Javascript-Framework dependency

## Example
```
<template>
  <div>
    <resize-sensor @resize="resize"></resize-sensor>
  </div>
</template>

```

## API

### props

#### initial <sup>Boolean<sup>
Request an initial size event.


### events

#### @resize <sup>Object<sup>
A size object `{ width, height }`


## Browser support
Same browser support as [Vue.js 2](https://github.com/vuejs/vue/blob/dev/README.md)

## Note
since v2.x, the script is exported as esm.

## Credits
[<img src="https://www.franck-freiburger.com/FF.png" width="16"> Franck Freiburger](https://www.franck-freiburger.com)

---
_Source: https://npm.io/package/vue-resize-sensor · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
