Skip to content

Component · 07

Textarea

The multi-line sibling of Input: flat, ruled, and a plain textarea underneath.

Default

Always give it a label.

tsx
<label>
  Message
  <Textarea placeholder="Tell us what happened" />
</label>

Invalid and disabled

Tie the message to the field with aria-describedby so screen readers announce it.

Write at least 20 characters.
tsx
<Textarea invalid aria-describedby="msg-error" defaultValue="Hi" />
<p id="msg-error">Write at least 20 characters.</p>

<Textarea disabled defaultValue="Locked while we review." />

Props

PropTypeDefaultDescription
invalidbooleanfalseRed border and aria-invalid. Pair it with a visible message.
rowsnumber4Visible lines before it scrolls. Users can still resize it vertically.

All other props of <textarea> (including ref) are passed through.