Textarea
A styled multiline text field for messages, descriptions, feedback and longer form content.
Installation
Install Textarea in your project.
npx binhlaig-ui@latest add textareaFor project setup, installer selection, dependencies, and advanced installation instructions, see the Installation Guide.
View Installation Guide →Update or Overwrite →Import
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.
API 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 |