Loading...
Loading...
> A multi-line text input for longer content.
1import { Textarea } from "@/components/ui/textarea"
1<Textarea placeholder="Type your message here..." />
1<Textarea placeholder="Write something..." />
1<div className="grid gap-2">2 <Label htmlFor="message">[MESSAGE]:</Label>3 <Textarea id="message" placeholder="Type your message here" />4</div>
1<Textarea disabled placeholder="Disabled textarea" />
1<Textarea error placeholder="Invalid content" />
1<Textarea2 defaultValue="This is some default text that appears in the textarea when it first renders."3/>
| Prop | Type | Default | Description |
|---|---|---|---|
| error | boolean | false | Show error styling with red border. |
| disabled | boolean | false | Disable the textarea. |
| rows | number | - | Number of visible text lines. |
✓ Use Textarea when:
✗ Don't use when:
Best Practices: