0.1.4 • Published 5 years ago

vue-autosizer v0.1.4

Weekly downloads
9
License
MIT
Repository
github
Last release
5 years ago

Vue Autosizer

A light (2.2kB) and dependency-free replacement for built-in <textarea> and <input> elements allowing them to automatically stretch to fit the content.

Demo

Edit on JSFiddle

Install

npm

npm install vue-autosizer

yarn

yarn add vue-autosizer

How to use

Global Registration

You can import and register the plugin in the entry point of your application like so:

import VueAutosizer from 'vue-autosizer'
import 'vue-autosizer/dist/vue-autosizer.min.css'

Vue.use(VueAutosizer)

Then use it like any other component:

// Input that grows in width
<autosize-input v-model="" />

// Textarea that grows in height
<autosize-textarea v-model="" />

Local Registration

<template>
    <autosize-input v-model="" />

    <autosize-textarea v-model="" />
</template>

<script>
import { AutosizeInput, AutosizeTextarea } from 'vue-autosizer'

export default {
    components: { AutosizeInput, AutosizeTextarea }
}
</script>

<style src="vue-autosizer/dist/vue-autosizer.min.css"/>

Contribution

If you have any reasonable PR you are welcome.

License

MIT

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago