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

autogrow-textarea

1.0.1 • Public • Published

Autogrow textarea plugin

npm i autogrow-textarea vanilla js plugin for autogrow textarea. Already hooks up existing textareas on page with data-autogrow attibute.

Autogrow options

data-autogrow can accept number e.g. data-autogrow="5", this number represents maximum amount of lines allowed

Manual hook up

To manually apply the plugin just create a class with element and options passed as arguments:

import {AutogrowTextarea} from 'autogrow-textarea';
 
let textArea = new AutogrowTextarea(document.querySelector('.my-text-area'), {maxRows: 5});

to destroy textArea call textArea.destroy()

Tests

npm run serve to start server then npm run test

Install

npm i autogrow-textarea

DownloadsWeekly Downloads

4

Version

1.0.1

License

ISC

Unpacked Size

14 kB

Total Files

10

Last publish

Collaborators

  • avatar