Skip to documentation

ComponentsFields & validation

Textarea

Shared primitive

Enter plain multiline content.

@/components/ui/textarea

Composition preview

Try Textarea alongside its related fields & validation components. These examples keep all actions local.

A short, recognizable name.

Usage

import { Field, FieldLabel } from "@/components/ui/field";
import { Textarea } from "@/components/ui/textarea";

<>
<Field>
  <FieldLabel htmlFor="notes">Notes</FieldLabel>
  <Textarea id="notes" name="notes" rows={4} />
</Field>
</>

Composition recipe. Supply application state, handlers and persistence in the owning product component. Inspect the installed source before extending its API.

API & composition

Native textarea props, rows, value/defaultValue, required, ref

Usage & accessibility

Do not replace the rich-text composer with Textarea. Keep an error description associated.

Implementation contract

src/components/ui/textarea.tsx

Use named variants and semantic theme tokens. Preserve existing input values, refs, focus and cancellation behavior. Verify keyboard, narrow layouts and pending/error states when behavior changes.

V-2026-10-19_18.07.14