Usage
Props
Controlled value of the textarea.
Default value for uncontrolled mode.
Called when the textarea value changes. Receives the string value directly.
Placeholder text displayed when textarea is empty.
Disables the textarea and prevents user interaction.
Makes the textarea read-only (value visible but not editable).
Error message to display below the textarea. When set, applies error styling.
Label text displayed above the textarea.
Number of visible text rows (ignored when
autosize is true).Auto-grow to fit content. When enabled, height adjusts dynamically.
Minimum number of rows when
autosize is enabled.Maximum number of rows when
autosize is enabled.Additional CSS classes to apply to the textarea element.
HTML ID attribute. Auto-generated if not provided.
Examples
Basic Textarea
Auto-Growing Textarea
With Error State
Controlled with Character Count
Disabled and Read-Only
Notes
- Auto-resize functionality only works when
autosize={true} - When
autosizeis enabled, therowsprop is ignored - Resize is disabled when
autosizeis true (resize: none) - Min/max rows control height constraints in autosize mode
- Focus states include visible ring for accessibility