Skip to content

markmead/alpinejs-textarea-autogrow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alpine JS Textarea Grow

Alpine JS plugin x-grow adds in auto grow functionality to <textarea> elements 🌳

Example

<textarea x-data x-grow></textarea>

This <textarea> will now grow with the content.

Install

CDN

<script
  defer
  src="https://unpkg.com/alpinejs-textarea-grow@1.x.x/dist/grow.min.js"
></script>

<script defer src="https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js"></script>

NPM/Yarn

npm i -D alpinejs-textarea-grow

yarn add -D alpinejs-textarea-grow

Then you can register the plugin.

import Alpine from 'alpinejs'
import grow from 'alpinejs-textarea-grow'

Alpine.plugin(grow)

window.Alpine = Alpine

Alpine.start()

Stats

About

🌲 Alpine JS plugin that auto grows the height of a textarea based on its value

Topics

Resources

License

Stars

Watchers

Forks