Overview
Enter a description…
DefaultFocused text…
FocusShort
⚠ Must be at least 20 charactersDisabled
DisabledautoResize is enabled.
Installation
Usage
Variants
Default
Enter a description…
With Helper Text
Tell us about yourself…
Maximum 240 charactersRequired Field
Write your message here…
Error State
Short bio.
Bio must be at least 20 charactersWith Character Count
What’s happening today?
Keep it short and sweet22 / 280
States
| State | Border | Ring | Helper text color |
|---|---|---|---|
| Default | #D0D5DD | — | #667085 |
| Focus | #0479CE | #CDE4F5 4px | — |
| Error | #DC2626 | — | #B42318 |
| Success | #039855 | — | #027A48 |
| Disabled | #E5E7EB | — | — |
Avoid hiding a textarea when it is unavailable. Use
disabled so users can still see the field exists.API Reference
Label displayed above the textarea.
Placeholder text shown when the field is empty.
Helper or error message displayed below the textarea.
Validation state. Values:
default · error · success · disabledInitial number of visible rows.
Automatically grows the height to fit content.
Maximum character limit.
Displays a live character count below the textarea.
Marks the label with a required asterisk indicator.
Disables the textarea and applies the disabled visual style.
Controlled value of the textarea.
Change event handler.
Additional Tailwind classes for custom overrides.
Accessibility
- Textarea uses a native
<textarea>element with semantic<label>association viaid/htmlFor - Error messages are linked via
aria-describedbyso screen readers announce them - Required fields use the
requiredHTML attribute in addition to the visual asterisk disableduses the nativedisabledattribute — the element is excluded from tab order- Character count updates are announced via
aria-live="polite"whenshowCountis enabled - Focus ring (
0 0 0 4px #CDE4F5) meets WCAG 2.1 AA contrast requirements
Do’s & Don’ts
Do
- Use Textarea for open-ended input (descriptions, comments, notes)
- Always provide a visible label — never rely on placeholder alone
- Use
helperTextto set character expectations before the user types - Use
showCount+maxLengthwhen length is enforced
Don't
- Don’t use Textarea for short single-line inputs — use Input instead
- Don’t show error state until after the user has interacted with the field
- Don’t set a fixed height when content length is unpredictable — use
autoResize - Don’t use placeholder text as a substitute for a label