Skip to main content
The TextArea component provides a multi-line text input field with support for labels, helper text, and validation states.

Basic usage

Props

string
The label text displayed above the textarea.
boolean
Whether the textarea is required. When false, displays “(optional)” next to the label.
string
Tooltip text to display next to the label.
string
Helper text displayed below the textarea.
boolean
Whether the textarea is in an error state.
boolean
Whether the textarea is disabled.
string | number
default:"'100%'"
Width of the textarea container.
string
The controlled value of the textarea.
(event: React.ChangeEvent<HTMLTextAreaElement>) => void
Callback fired when the textarea value changes.
string
Placeholder text to display when the textarea is empty.
string
Additional CSS classes to apply to the textarea element.
React.CSSProperties
Additional inline styles to apply to the textarea element.

With label and helper text

Required field

Optional field

With info tooltip

Error state

Disabled state

Controlled component

Custom width

Custom rows

Accessibility

  • The TextArea component properly associates labels with the textarea element.
  • Helper text and error messages are accessible to screen readers.
  • The info tooltip icon supports keyboard navigation.
  • The required attribute is properly set for form validation.