Textarea

Forms

A multi-line text input for longer-form content.

Textareas let users enter a paragraph or more of text. Shelf's textarea matches the design language of the single-line input while giving content room to breathe.

npx shadcn@latest add textarea

Basic usage

A resizable textarea with a comfortable minimum height.

Preview
Live
tsx
1<Label htmlFor="bio">Bio</Label>
2<Textarea id="bio" placeholder="Tell us about yourself…" />

States

Disabled textareas signal that content cannot be edited.

Preview
Live
tsx
1<Textarea defaultValue="This can be edited." className="max-w-xs" />
2<Textarea defaultValue="This cannot be edited." disabled className="max-w-xs" />

API reference

All props of the underlying Base UI primitive are forwarded. The table below documents the Shelf-specific props.

PropTypeDescription
valuestringThe controlled textarea value.
onChangeChangeEventHandler<HTMLTextAreaElement>Called when the value changes.
placeholderstringPlaceholder shown while the field is empty.
disabledboolean= falseDisables the textarea.
rowsnumberThe number of visible text rows.
classNamestringAdditional classes merged into the textarea.