Skip to content

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

License

Notifications You must be signed in to change notification settings

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/[email protected]/dist/grow.min.js"
></script>

<script defer src="https://unpkg.com/[email protected]/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