Textarea
Multi-line free-form input for notes, comments and longer descriptions.
Purpose
Use Textarea for longer free-form input such as notes, comments and multi-line descriptions.
Multi-line input
Installation
With the Siteplane registry alias configured, add the component and import the installed source from your app.
CLI
pnpm dlx shadcn@4.16.1 add @siteplane/textareaImport
import { Textarea } from "@/components/ui/textarea";
import { Button } from "@/components/ui/button";
import { Form } from "@/components/ui/form";
import { Label } from "@/components/ui/label";
import { InputGroup, InputGroupAddon, InputGroupText, InputGroupTextarea } from "@/components/ui/input-group";
import { Field, FieldDescription, FieldError, FieldLabel } from "@/components/ui/field";Need the machine-readable source metadata? View registry JSON.
Usage
Use Textarea for multi-line input. Keep descriptions close through Field and avoid using it as a fixed-height display box.
import { Textarea } from "@/components/ui/textarea";
export function Example() {
return <Textarea aria-label="Notes" placeholder="Add notes" />;
}Examples
States, sizes, auto grow, field and input group compositions and form integration are props and compositions of the same primitive.
States
Sizes
Auto grow
Field integration
Input group compositions
Form integration
Unstyled
unstyled drops the form control shell so a custom surface can provide its own; auto grow stays.
API Reference
The reference lists the source-owned exports and props that are easy to miss in visual examples. Inherited Base UI props remain available unless the wrapper narrows them.
Textareaaccepts native textarea props plussize="sm" | "default" | "lg" | "xl".size="xl"keeps the multiline minimum-height contract while adopting the customer-facing 16px field text. Use the surrounding provider'sradius="sm"personality for the global 8px main corner.- The control supports native vertical resize and content-based auto sizing through the Siteplane styles.
- Use
InputGroupTextareawhen leading, trailing or block add-ons belong directly to the same field.
Motion
Component motion uses the shared Siteplane motion contract. See the global motion guide for provider setup, tokens and reduced-motion behavior.
- Textarea itself does not translate or scale. Focus, invalid and disabled states update without changing layout measurements.
- Manual resize remains native browser behavior and requires no reduced-motion override.
Accessibility
- Provide a visible label; placeholders are examples or hints, not accessible names.
- Pair invalid state with
FieldErrorand keep required, disabled and loading form state explicit. - Add-ons must not block focus or hide the native vertical resize affordance.
Implementation Guidance
- Use Input for one-line values and Textarea for multi-line content.
- Use
InputGroupTextareaonly for controls or hints directly coupled to the field. - Do not disable native resize or replace labels with placeholders without a product requirement.