A multiline text input that allows users to enter longer form content.
Loading demo: textarea-real-world
npx sdaia-ui@latest add textarea
import { TextArea } from '@/components/ui/TextArea';<TextArea placeholder="Enter your message..." />Default empty state.
Loading demo: textarea-default
Contains entered text.
Loading demo: textarea-filled
Active/focused state.
Loading demo: textarea-focused
Non-interactive state.
Loading demo: textarea-disabled
Props for the TextArea component.
Prop | Type | Default | Required |
|---|---|---|---|
label | ReactNode | - | optional |
helperText | string | - | optional |
error | string | - | optional |
destructive | boolean | false | optional |
showButton | boolean | false | optional |
buttonLabel | string | 'Button' | optional |
onButtonClick | () => void | - | optional |
fullWidth | boolean | false | optional |
How this component behaves at the three system breakpoints. Spacing and type tokens switch automatically at 768px and 1280px.
| Screen | Behavior |
|---|---|
| Desktop (1280px and up) | Full width of its container. People can drag to change the height (100–200px). |
| Tablet (768–1279px) | Same layout as desktop, with the tablet token values. |
| Phone (under 768px) | Full width of the screen's container, with the mobile token values. No minimum width, so it fits a 360px screen. |