@shaack/auto-resize-textarea

Auto resizing textareas, can be used with bootstrap

Usage no npm install needed!

<script type="module">
  import shaackAutoResizeTextarea from 'https://cdn.skypack.dev/@shaack/auto-resize-textarea';
</script>

README

auto-resize-textarea

Auto resizes the height of any <textarea> to match the text input.

  • No dependencies
  • Works with Bootstrap

Try it

Demo page

Repository

GitHub

Usage

<textarea class="auto-resize"></textarea>

<script src="src/auto-resize-textarea.js"></script>
<script>
    autoResizeTextarea(document.querySelectorAll("textarea.auto-resize"), {maxHeight: 320})
</script>

Installation

npm -i @shaack/auto-resize-textarea