Textarea
Displays a form textarea or a component that looks like a textarea.
Installation
terminal
npx felicityui add textarea --platform reactUsage
example.tsx
import { Textarea } from "@/components/ui/textarea"
<Textarea placeholder="Type your message here." />Composition
Textarea └── (optional) label / description / error
Default
Field
Label and description via Textarea field chrome.
Your thoughts help shape the next release.
Disabled
disabled sets data-disabled on the field shell.
Invalid
error ties to aria-invalid and data-invalid.
Keep it under 280 characters.
RTL
dir=rtl
صف التغيير بإيجاز.
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| label | ReactNode | — | Optional field label. |
| description | ReactNode | — | Helper text below the control. |
| error | ReactNode | — | Error message; sets invalid styling. |
| invalid | boolean | — | Marks the control invalid without requiring error text. |
| hint | ReactNode | — | Inline hint beside the label. |
| orientation | vertical | horizontal | vertical | Label layout relative to the control. |
| rows | number | 4 | Visible row count. |
| disabled | boolean | — | Disables the textarea. |
| className | string | — | Additional classes on the control. |
| textareaVariants | ({ invalid?, className? }) => string | — | Exported class helper. |
Accessibility
WCAG 2.2 AA
- Native textarea semantics.
- Label associated via htmlFor when field chrome is used.
aria-invalidandrole=alertfor errors.- Visible
focus-visiblering.
Platform notes
React
Native HTML textarea with Felicity semantic tokens. Paper surface, hairline border, copper focus ring — not Base UI / Radix runtime.
Server Componentcompatible.- Uses
data-slot=textarea; field chrome usesdata-slot=field|field-label|field-description|field-error. data-invalidanddata-disabledon the field shell when chrome is present.aria-invalidwhen invalid or error is set.