Textarea
Multi-line text input for longer content. Supports error states, resizing, and pairs with the Label component.
Installation
$ npx shadcn@latest add textareaPreview
Usage (React/TSX)
import { Textarea } from "@/components/ui/textarea"
import { Label } from "@/components/ui/input"
export default function FeedbackForm() {
return (
<div className="space-y-3">
<Label>Your feedback</Label>
<Textarea placeholder="Tell us what you think..." rows={4} />
</div>
)
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
| error | boolean | false | Shows error state with red border. |
| placeholder | string | β | Placeholder text. |
| disabled | boolean | false | Disables the textarea. |
| className | string | β | Additional CSS classes to apply. |