Skip to content

Textarea

A multi-line text input.

It grows with what is typed, from 64px, and has no resize handle.

With a label

Grows with its content

Disabled

Invalid

Installation

npx shadcn@latest add @khaeli/textarea

Install @khaeli/foundation first: this item's styling lives in its tokens and [data-slot] rules.

Installs with

Registry items

Keyboard

Enter
Adds a line.
Tab
Moves focus on. It never types a tab. A disabled textarea leaves the tab order.

Accessible name

  • Give the textarea an id and point a @khaeli/label at it with htmlFor. A placeholder is not a name.
  • An invalid control carries aria-invalid and lists the id of its message in aria-describedby, so the message is read as its description. @khaeli/field lays the label, control and message out.

Registry JSON

The item as the shadcn CLI reads it, with every file it ships: https://ui.khaeli.com/r/textarea.json