Textarea

uistable

Textarea — extracted 1:1 from WEM-App.

npx shadcn add @krawma/textarea

registry: @krawma/utils

Preview

States
focus-visibledisabledaria-invalid
Depends on
utils

Purpose

A multi-line free-text field (notes, descriptions, comments). For single-line entry use input.

Anatomy

A styled native <textarea> (data-slot="textarea"), forwarding all native props.

Style

No variants — one canonical look matching input (token --input/--border). Control height with rows or a min-h-* utility; width is the container's.

Behavior & functionality

Controlled or uncontrolled per native semantics. Pair with a Label.

Accessibility

  • Must have an associated Label or aria-label.
  • Honor focus-visible, disabled, and aria-invalid (+ aria-describedby for the error message).

Do / Don't

  • ✅ Set aria-invalid + an error message on validation failure.
  • ❌ Don't use for single-line input — use input.