This page as markdown: /textarea.md · Index for agents: /llms.txt · Everything in one file: /llms-full.txt

Textarea

Status: stable

Styled native multi-line text control. Soft-square, the theme's field surface, --ring focus, and an aria-invalid destructive error state.

Keywords: textarea, multi line input, form, text

Usage

Use Textarea for multi-line freeform text entry such as notes, descriptions, or messages.

Best practices

Props

Name Type Default Description
aria-invalid boolean — When true, swaps the input border to the destructive token to signal a validation error.
disabled boolean false Dims the control to 50% and blocks pointer interaction.
rows number — Native textarea row count. The floor is min-h-20 on the spacing scale, so it moves with density.
autoResize boolean false Grows to fit content via CSS field-sizing: content (no JS). The min-height stays the floor; browsers without field-sizing fall back to the fixed min-height.
...props ComponentPropsWithRef<"textarea"> — All native textarea attributes (value, placeholder, onChange, name, ref, …).

Tokens used

field-border, field, foreground, muted-foreground, ring, destructive

Accessibility