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.
npm i v-autosize-input
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.
Name | Reason |
---|---|
vue-autosize | Works well on IME but seems not maintained |
vue-input-autowidth | Does not work on IME |
If you need autosize feature on textarea
, v-autosize, which has forked from vue-autosize, seems good choice.