Textarea
A multi-line text input field.
formprimitive
Loading preview...
Installation
npx baseui-cn add textareaUsage
import { Textarea } from "@/components/ui/textarea"
<Textarea placeholder="Write something..." />
Examples
Basic
A simple textarea.
Loading preview...
Disabled
A disabled textarea.
Loading preview...
With Field
Combine with Field for labeling and errors.
Loading preview...
Auto-resize
Grows with content using field-sizing-content.
Loading preview...
In a popover form
Use textarea inside a Base UI popover when you need lightweight inline feedback or support flows.
Loading preview...
With input group
Pair textarea with actions, menus, and metadata for chat-style or composer-style interfaces.
Loading preview...
API
Textarea
| Prop | Type | Default | Description |
|---|---|---|---|
size | "sm" | "default" | "lg" | "default" | Padding and min-height scale of the textarea |
unstyled | boolean | false | Strip the outer wrapper styles for composition inside InputGroup |