Automatic Textarea Resizer In Vanilla JavaScript

Category: Form , Javascript | August 12, 2020
Author: shaack
Views Total: 48 views
Official Page: Go to website
Last Update: August 12, 2020
License: MIT


Automatic Textarea Resizer In Vanilla JavaScript


A Vanilla JavaScript plugin to automatically adjust the height of the textarea while typing.

Supports the native paste event and works with the latest Bootstrap framework.

How to use it:

1. Insert the JavaScript file auto-resize-textarea.js into the document.

<script src="src/auto-resize-textarea.js"></script>

2. Attach the autoResizeTextarea plugin to your textarea element and done.

<textarea class="form-control"></textarea>

3. Specify the max height of the textarea.

  maxHeight: 140

You Might Be Interested In:

Leave a Reply