Textarea
shadcn/ui
Multi-line text input. Use for ticket descriptions, comments, and any content that may exceed a single line.
@/components/ui/textareaStates
DefaultEmpty, ready for input
With valuePre-filled content
DisabledRead-only / locked field
ErrorValidation failed
SubtleInside a card or panel
With character count
0/500
In-context — comment field
Comment input at the bottom of a ticket activity feed. Uses the subtle state (bg-muted) to blend with the card background.
Activity
AS
Alice Smith2h ago
Reproduced locally. The file size check only runs client-side — server-side validation is missing.
BJ
Bob Johnson1h ago
I will add server-side validation to the upload handler. ETA: end of day.
Key props
| Prop | Type | Notes |
|---|---|---|
| rows | number | Visible line count. Use 2–3 for comments, 4–6 for descriptions. |
| value | string | Controlled value — pair with onChange for live character counting. |
| defaultValue | string | Uncontrolled initial value. |
| disabled | boolean | Renders read-only with reduced opacity. |
| placeholder | string | Hint text shown when the field is empty. |
| className | string | Override bg-background, min-height (min-h-[80px]), or border style. |
On this page