- Plugins
- Textarea Auto Height
Plugins
Tailwind CSS Textarea Auto Height Plugin API
Headless, unstyled Textarea Auto Height plugin built with JavaScript and TypeScript, including installation, usage, options, methods, events, and selectors.
Installation
To get started, install Textarea Auto Height plugin via npm, or skip this step if you are already using Preline UI as a package.
Terminal
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