v-autosize-input

Vue directive to apply autosize-input

Usage no npm install needed!

<script type="module">
  import vAutosizeInput from 'https://cdn.skypack.dev/v-autosize-input';
</script>

README

v-autosize-input

Support Vue 2 Version License

Yet another Vue directive to change <input> width automatically by content length. It works well on IME by using autosize-input internally.

Edit v-autosize-input demo

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.