Components
Displays a form textarea or a component that looks like a textarea.
Playground
field-sizing-content from a 64px minimum height — type in the preview to see it expand. Text renders at 16px on mobile — so iOS never zooms the field on focus — and drops to 14px from the md breakpoint up.import { Textarea } from "@workspace/ui/components/textarea"
<Textarea placeholder="Type your message here." /><div className="grid w-full max-w-sm gap-3"> <Label htmlFor="message">Message</Label> <Textarea id="message" placeholder="Type your message here." /> </div>
<Textarea placeholder="Type your message here." disabled />
aria-invalid when validation fails — the border and ring switch to the destructive color, and assistive technology announces the state. Inside a Field, FieldError wires this up automatically.<Textarea placeholder="Type your message here." aria-invalid />
<div className="grid w-full gap-2"> <Textarea placeholder="Type your message here." /> <Button>Send message</Button> </div>
<Field> <FieldLabel htmlFor="message">Message</FieldLabel> <FieldDescription>Enter your message below.</FieldDescription> <Textarea id="message" placeholder="Type your message here." /> </Field>
<div dir="rtl" className="grid w-full max-w-sm gap-3">
<Label htmlFor="feedback-rtl">التعليقات</Label>
<Textarea
id="feedback-rtl"
placeholder="تعليقاتك تساعدنا على التحسين..."
/>
</div>rows attribute only takes effect in browsers without field-sizing support, where it sets the fallback height.Tokens used
8 design tokens consumed by the Textarea component.
--input
Input
--ring
Ring
--destructive
Destructive
--muted-foreground
Muted Foreground
--text-base
Text Base (16px)
--text-sm
Text Small (14px)
--radius-md
Radius 0.8× (8px)
--spacing
Spacing unit (4px)