Skip to content

Forms

Textarea

Multi-line text field that starts at about four lines and grows with its content.

  • Experimental
  • Keyboard not tested yet
  • Screen reader not tested yet

Updated 2026-11-12

Playground

Change the props. The controls come from the documented props.

Anything we should know before the first call?

tsx
<Textarea
  label="Notes"
  name="playground-notes"
  hint="Anything we should know before the first call?"
/>

States

Every variant in every state, side by side. Hover, pressed and focus are shown statically; the default state is interactive.
  • default
  • focus-visible
  • disabled
  • Error: Enter a message.

    invalid

Usage

When to use

Use a textarea for answers that take more than one line: a message, a project brief, feedback.

When not to use

  • For short answers such as a name or an email address: use Input.

How it works

It starts at about four lines and grows with its content, so people never scroll inside a small box. Label, hint and error work as in every other field.

Content guidelines

Use the hint to say what a good answer contains: “Goals, timeline, team. A few sentences are enough.” That helps more than a character limit.

Do and don’t

Do
  • Say in the hint what a good answer contains.
Don’t
  • Don't use it for one-line answers; use Input.

Anatomy

The parts of the component and what each one does, as in the playground above.
  1. labelAlways visible.
  2. input-fieldAt least textarea.minHeight, grows with content, resizable.
  3. error-messageSame treatment as Input.

Examples

Type-checked, and the same code goes into the AI manifest. Import: import { Textarea } from "@/ds";

With hint

What should change, and by when?

Props

Checked against the component's TypeScript type on every build.
Textarea props
NameTypeDefaultDescription
label (required)string–Visible label.
hintstring–Help text, e.g. what to include.
errorstring–Error message; overrides native validation.
optionalbooleanfalseAdds “(optional)” to the label.
messagesValidationMessages–Texts for native validation inside a Form.
…textareaTextareaHTMLAttributes–Native attributes except placeholder.

Tokens used

Derived from the utility classes in the component's source. Copy a class with one click.
Tokens used by Textarea
TokenTierValueUtility
textarea.minHeightcomponent96px
spacing.3semantic12px

Accessibility

What is checked automatically on every build, and what a person has tested. Nothing is marked as tested unless it was.
Testing status by check
CheckHowStatus
axe-core rulesAutomated on every npm run check, at desktop and mobile widthRuns on every build
KeyboardAutomated Playwright test (scripts/keyboard.mjs)Not tested yet
Screen readerManualNot tested yet

Keyboard

Textarea keyboard interactions
KeyAction
TabMoves focus into the field.

Semantics and focus

  • Label, hint and error come from Field.
  • Grows with the text, so nothing is hidden behind a scrollbar.