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:
; let textArea = document maxRows: 5;
to destroy textArea call textArea.destroy()
Tests
npm run serve
to start server then npm run test