Textarea
atomMulti-line text field with optional auto-resize, character count, and three sizes. Ideal for bios, notes, and any open-ended text input.
Auto-resize
The textarea grows as you type.
Character count
Shows remaining characters when maxLength is set.
Sizes
Three sizes with size-aware font and padding.
Usage
Installation
API Reference
Textarea props — * required
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | Label displayed above the textarea. |
placeholder | string | — | Hint text when the field is empty. |
value | string | — | Controlled value. |
size | "sm" | "md" | "lg" | "md" | Height, font size, and padding scale. |
autoResize | boolean | false | Grows the textarea height as content is added. |
maxLength | number | — | Character limit. Used with showCount to display a counter. |
showCount | boolean | false | Displays remaining character count when maxLength is set. |
helperText | string | — | Hint or description below the textarea. |
errorText | string | — | Error message; triggers the error visual state. |
disabled | boolean | false | Prevents interaction. |
onChange | (e: React.ChangeEvent<HTMLTextAreaElement>) => void | — | Change event handler. |