v-autosize-input
v0.3.0
Published
Vue directive to apply autosize-input
Downloads
54
Readme
v-autosize-input
Yet another Vue directive to change <input>
width automatically by content length.
It works well on IME by using autosize-input internally.
The most of implementation has copied and translated to TypeScript from vue-autosize. See LICENSE.orig for the original license.
Install
npm i v-autosize-input
Usage
import Vue from 'vue';
import VAutosizeInput from 'v-autosize-input';
Vue.use(VAutosizeInput);
Then use autosize-input
directive on <input>
element like:
<input type="text" v-autosize-input />
See ./example/src/App.vue for more detail.
Comparison
| Name | Reason | | ---------------------------------------------------------------------- | ------------------------------------------ | | vue-autosize | Works well on IME but seems not maintained | | vue-input-autowidth | Does not work on IME |
See also
If you need autosize feature on textarea
, v-autosize, which has forked from vue-autosize, seems good choice.