Textarea
A styled multiline text field for messages, descriptions, feedback and longer form content.
Installation
Initialize Binhlaig UI and install Textarea with your preferred installer.
Initialize first
npx binhlaig-ui@latest initnpx binhlaig-ui@latest add textareaImport
Import Textarea from your UI component directory.
import { Textarea } from "@/components/ui/textarea"Usage
Use Textarea for multiline user input.
With Label
Connect the label and helper text to the textarea.
Your message will be visible to the support team.
Sizes
Textarea includes small, default and large sizes.
States
Use disabled and aria-invalid for form states.
Please enter a valid message.
Resize
Control how the user can resize the textarea.
Character Count
Display the current and maximum character count.
Form Example
Use Textarea in a controlled feedback form.
Update or Overwrite
Replace an older Textarea source with the latest registry version.
npx binhlaig-ui@latest add textarea --overwriteAPI Reference
Textarea supports native HTML attributes and these styling props.
| Prop | Values | Default |
|---|---|---|
size | sm, default, lg | default |
resize | none, vertical, horizontal, both | vertical |
aria-invalid | boolean | false |
disabled | boolean | false |