Text Area

The Text Area component supports multi-line text input with theming, validation states, icons, labels, and accessibility features for richer large input handling.

Usage

Default

const [value, setValue] = useState("");

<TextArea
  value={value}
  onChange={(nextValue) => setValue(nextValue)}
  placeholder="Enter your message..."
/>

With Label

const [value, setValue] = useState("");

<TextArea
  label="Message"
  labelPosition="top"
  value={value}
  onChange={(nextValue) => setValue(nextValue)}
  placeholder="Write your message..."
/>

With Icon

const [value, setValue] = useState("");

<TextArea
  icon={FaCommentDots}
  value={value}
  onChange={(nextValue) => setValue(nextValue)}
  placeholder="Leave a comment..."
/>

Validation States

<TextArea state="success" defaultValue="Looks good" />
<TextArea state="warning" defaultValue="Needs review" />
<TextArea state="error" defaultValue="Missing required details" />

Fixed Height

const [value, setValue] = useState("");

<TextArea
  height="160px"
  value={value}
  onChange={(nextValue) => setValue(nextValue)}
  placeholder="A taller textarea for longer content..."
/>

Non-Resizable

<TextArea
  resizable={false}
  defaultValue="This textarea cannot be resized."
/>

With Accessible Description

Use this field to describe your experience with the product.
<TextArea
  label="Experience"
  ariaDescription="Use this field to describe your experience with the product."
  placeholder="Describe your experience..."
/>

Props

Sortable data table
PropTypeDefaultDescription
valuestring-Controlled value of the textarea.
defaultValuestring-Initial value for uncontrolled usage.
placeholderstring"Enter text"Placeholder text shown when the textarea is empty.
labelstring-Optional visible label displayed alongside the textarea.
labelPosition"top" | "bottom" | "left" | "right""top"Controls where the visible label is positioned.
theme"primary" | "secondary" | "tertiary" | "quaternary" | "clear"Configured DefaultVisual theme applied to the textarea container.
state"" | "success" | "error" | "warning"""Validation or feedback state styling.
rounding"none" | "small" | "medium" | "large"Configured DefaultControls the border radius of the textarea container.
shadow"none" | "light" | "medium" | "strong" | "intense"Configured DefaultControls the shadow intensity of the container.
outlinebooleanfalseRenders the textarea with an outlined style.
iconReact.ComponentType-Optional icon displayed inside the textarea container.
disabledbooleanfalseDisables the textarea and prevents interaction.
readOnlybooleanfalseMakes the textarea read-only while still focusable.
requiredbooleanfalseMarks the textarea as required.
heightstring | number-Sets an explicit height for the textarea, such as `150px` or `220`.
resizablebooleantrueIf false, disables textarea resizing.
autocompletebooleanfalseEnables native browser autocomplete when set to `true`.
ariaLabelstring-Accessible label used when no visible label is provided. Falls back to placeholder if needed.
ariaDescriptionstring-Additional description announced by screen readers via `aria-describedby`.
onChange(value: string, event: React.ChangeEvent<HTMLTextAreaElement>) => void-Called when the textarea value changes. Receives both the current value and the original change event.
classNamestring-Additional custom class names for the textarea container.
data-testidstring"text-area"Test ID for the root element.