- Plugins
- Textarea Autoheight
Plugins
Tailwind CSS Textarea Autoheight
Automatically sets the height of the textarea.
Installation
To get started, install Textarea Autoheight plugin via npm, else you can skip this step if you are already using Preline UI as a package.
npm i @preline/textarea-auto-height
Basic usage
Prefer to create your own style? Here is a completely unstylized example.
<textarea data-hs-textarea-auto-height></textarea>
Methods
The HSTextareaAutoHeight
object is contained within the global window
object
Destroy instance.
const { element } = HSTextareaAutoHeight.getInstance('#textarea-autoheight', true);
const destroyBtn = document.querySelector('#destroy-btn');
destroyBtn.addEventListener('click', () => {
element.destroy();
});
Demo examples
Looking for prebuilt UI components based on the Tailwind CSS? Preline UI packs hundreds of component examples for all your website needs.
Check out Preline UI Components