Color
Typography
Spacing
Radius
Border
Opacity
Elevation
Blur
Avatar
Badge
Button
Checkbox
Input
ProgressBar
RadioButton
Separator
Slider
Switch
TextArea
TextLink
Accordion
Breadcrumb
ButtonGroup
Combobox
DropdownMenu
ListItem
Pagination
SegmentedControl
Select
Tooltip
Calendar
Card
CommandMenu
DatePicker
Dialog
Drawer
EmptyState
Footer
Form
NavigationBar
Sidebar
Skeleton
Table
Tabs
Toaster

TextArea

Multi-line text field with a label and helper text. Resizes vertically; Error shows the helper text as the error message.

Helper text

Usage

Import the component and render it.

import { TextArea } from 'src/components/TextArea/TextArea';

<TextArea label="Label" placeholder="Placeholder text" helperText="Helper text" />

Accessibility

Role: textbox, multi-line (native <textarea>).

KeyAction
TabMoves focus to the field (shows the Focus state)
EnterInserts a new line
  • The Label is a <label for> the field: clicking it focuses the field. Without a label, pass aria-label.
  • The helper text is linked with aria-describedby; with error it is the error message and the field gets aria-invalid="true".
  • Text fields show :focus-visible on click as well as on Tab, so Focus appears whenever the field is being typed in.

States

Filled comes from the content (defaultValue); Disabled from the disabled prop; Error from the error prop. Hover and Focus follow the pointer and the keyboard: try them in the playground.

Helper text

Default

Helper text

Filled

Helper text

Disabled

Helper text

Error
<TextArea defaultValue="Input text" />
<TextArea disabled />
<TextArea error />

Used in

TextArea is part of Form.

Actions

Pass callbacks to respond to the component.

import { TextArea } from 'src/components/TextArea/TextArea';

<TextArea
  label="Label"
  placeholder="Placeholder text"
  helperText="Helper text"
  onValueChange={(value) => console.log(value)}
/>
CallbackWhen
onValueChangeFires on every change.