This tiny web component can be dropped in as a replacement for a native textarea.
Here's an HTML form with an expanding-textarea
and native textarea
. Try them both out.
Watch the outputs and poke at them with your browser's devtools.
The expanding textarea should participate in the form just like a normal textarea.
And here's what the form values look like:
For more information, check the README on GitHub.