mirror of
https://github.com/tenrok/vue-tribute.git
synced 2026-06-18 11:30:36 +03:00
27 lines
489 B
Markdown
27 lines
489 B
Markdown
# vue-input-autosize
|
|
|
|
> A simple Vue.js directive for autosizing a text input based on its content.
|
|
|
|
## Install
|
|
|
|
```js
|
|
$ npm install vue-input-autosize --save
|
|
```
|
|
|
|
## Usage
|
|
|
|
```js
|
|
import Vue from "vue";
|
|
import VueInputAutosize from "vue-input-autosize";
|
|
|
|
Vue.use(VueInputAutosize, { maxWidth: 500, minWidth: 20, comfortZone: 0 });
|
|
```
|
|
|
|
...and inside your template:
|
|
|
|
`<input type='text' v-model='msg' v-input-autosize />`
|
|
|
|
## License
|
|
|
|
MIT © [Collin Henderson](https://github.com/syropian)
|