Skip to content
esc

Textarea

Inputshadcn/ui

Multi-line text such as a note, a message or a description. Looks exactly like Input and grows with its content.

When to use

  • Wrap it in Field (shipped with Input) to get the label, description and error.
  • Use it for free text longer than one line.
  • Don't use it for single-line values like a name or an email; use Input.
  • Don't let users resize it by hand; it grows on its own.

Accessibility

Role
textbox (multi-line)
Keyboard
Enter adds a new line; it never submits the form.
Notes
Always pair with a visible label through Field or Label.

Props

  • rows

    number

    Starting height in lines; it still grows as the user types.

  • aria-invalid

    boolean

    Error state: tinted background and danger border. Pair it with Field's error.

  • maxLength

    number

    Show a character counter under it when you set one.

Prompt for your agent

Use the UnbuiltUI Textarea. Call unbuilt_get_component("Textarea") first and follow its spec: variants, states, usage rules and accessibility.

unbuilt_get_component returns

0 variants4 states3 props4 usage rules2 a11y notes8 tokens1 example

Add it with shadcn

$npx shadcn add https://unbuiltui.com/r/textarea.json

Tokens · 8

bg.subtlebg.raisedfg.defaultfg.subtleborder.focusdanger.defaultdanger.subtleradius.md