Miss any of our Open RFC calls?Watch the recordings here! »

textarea-auto-grow-ridwan

1.0.0 • Public • Published

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);

Install

npm i textarea-auto-grow-ridwan

DownloadsWeekly Downloads

2

Version

1.0.0

License

ISC

Last publish

Collaborators

  • avatar