Skip to content

This is a javascript plugin to have the ability for a textarea to automatically grow and shrink dynamically with its content.

Notifications You must be signed in to change notification settings

rdhafiz/grow.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grow.js

This is a javascript plugin to have the ability for a textarea to automatically grow and shrink dynamically with its content.

Getting started

Installation

Quick Start with GIT with Documentation
git clone https://github.com/RidwanulHafiz/grow.js.git
Quick Start with NPM
  • Install with NPM npm install textarea-auto-grow-ridwan

Usage

HTML component

<textarea data-grow="auto"></textarea>

Import grow.js inside </head> section

<script src="/path/grow.js"></script>

Then call it when document is ready. It will automatically call with default options when document is ready. if you want to call it with custom option then call it after document ready.

document.addEventListener('DOMContentLoaded', function(){
        var option = {
            height : 100,
            maxHeight : 500
        };
        AutoGrow.init(option);
    }, false);

Usage in Vue JS 2

HTML component

<textarea data-grow="auto"></textarea>

Import package into component

import grow from 'textarea-auto-grow-ridwan'

Then call it when component is ready.

var option = {
    height : 100,
    maxHeight : 500
};
grow.init(option);

About

This is a javascript plugin to have the ability for a textarea to automatically grow and shrink dynamically with its content.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published