ui · Primitive
Textarea
@devalok/shilp-sutra/ui/textareaView in Storybook Hand-curated previews ship in rolling waves. See it live in Storybook →
Reference
Props
size: "xs" | "sm" | "md" | "lg"
state: "default" | "error" | "warning" | "success"
(plus standard textarea attributes except native "size")
Defaults
size: "md"
Example
<Textarea size="lg" state="error" placeholder="Describe the issue..." />
Composability
- FormField auto-consumption: Same pattern as Input — inside
<FormField>, Textarea inheritsstate,aria-describedby,aria-invalid,aria-required. Explicit props override. - Resize: Vertically resizable by default (
resize-y); override withclassName="resize-none"if needed. - Label pairing: Manual —
<Label htmlFor="x" />+<Textarea id="x" />. FormField doesn't auto-wire. - No IconProvider cascade (no icon slots — different from Input).
Gotchas
- state="error" sets aria-invalid automatically; all sizes are vertically resizable
- Inside FormField: auto-inherits state, aria-describedby, aria-required from context (explicit props override)
Changes
v0.15.0
- Changed
lgsize font changed fromtext-ds-lg(18px) totext-ds-md(14px) — all input sizes now use 14px for consistency - Changed
mdsize font standardized totext-ds-md(14px)
v0.8.0
- Fixed Now consumes FormField context automatically (
aria-describedby,aria-invalid,aria-required)
v0.4.2
- Added
textareaVariantsexport
v0.1.1
- Fixed Added
aria-invalidfor error state (matching Input pattern)
v0.1.0
- Added Initial release