DilanTsasi / vue-autoheight-input

A simple vuejs plugin for auto resizing the height of a textarea

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vue-Autoheight-Input

A simple vuejs plugin for auto resizing the height of a textarea

Installation

npm

  npm install vue-autoheight-input

yarn

  yarn add vue-autoheight-input

Usage

The wrapper creates a textarea feild on which all actions are implemented

<template>
    <autoheight-input v-model="content" @input="handleInput"></autoheight-input>
</template>
<script>
import {AutoheightInput} from 'vue-autoheight-input'
export default{
    components:{
        AutoheightInput
    },
    data(){
        return{
            content:''
        }
    },
    methods:{
        handleInput(evt){
            //
        }
    }
}
</script>

Custom styling

All custom styling can be adding via class aributes

Props

Property Type Required Description Default
placeholder String false the editor placeholder type here
maxlength Integer false the max lenght of the input null
minlength Integer false the min lenght of the input null

About

A simple vuejs plugin for auto resizing the height of a textarea

License:MIT License


Languages

Language:Vue 86.6%Language:JavaScript 13.4%