vue-resize-on-event

Vuejs directive that resizes on an event (e.g. textarea)
311
Install
npm install vue-resize-on-event
Latest Version:1.2.0
Vue:2
License:MIT
Last Updated:Oct 27, 2018
Links: npm
Maintainer: venkatperi

vue-resize-on-event

npm vue2

VueJS directive to resize a component when a given event fires.

Installation

npm install --save vue-resize-on-event

Example

Include the module for the input event to register the custom directive v-resize-on-input:

import Vue from 'vue'
import VueResizeOnEvent from 'vue-resize-on-event'

export default {
   mixins: [
     VueResizeOnEvent( 'input' ), //registers directive v-resize-on-input
   ],

   data() {
     return {
       text: '',
     }
   },
 }

Usage

Add attribute v-resize-on-input to a textarea element to have it resize automatically when its value is changed interactively.

<template>
  <div>
    <textarea
      v-model="text"
      v-resize-on-input>
    </textarea>
  </div>
</template>

License

MIT

Related Packages

vue3-highlight-text

a vue3 directive of highlight text

84,789
vue-computed-dimensions

A mixin which allows component HTML dimensions (width, height, x and y positions...

7,109
vue-proportion-directive

vue 固定元素比例指令

6,003 10
ardirectives

Ardirectives

811
vue-on-click-outside

vue mixin/directive that does something when you click outside a container

169,297 31

Version History

Version Released Vue License
1.2.0 ^2.5.16 MIT
1.1.6 ^2.5.3 MIT
1.1.5 ^2.5.3 MIT
1.1.4 ^2.5.3 MIT
1.1.3 ^2.5.3 MIT