Alpine JS plugin x-grow
adds in auto grow functionality to <textarea>
elements 🌳
<textarea x-data x-grow></textarea>
This <textarea>
will now grow with the content.
<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 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()