Forms
Textarea
A text field for several lines. It grows with its text, down and never sideways.
Forms
A text field for several lines. It grows with its text, down and never sideways.
Change the props on the right. The textarea and its code follow.
import { Label } from 'omuk-ui/label';
import { Textarea } from 'omuk-ui/textarea';
<div className="flex flex-col gap-1">
<Label htmlFor="notes">Notes</Label>
<Textarea id="notes" placeholder="What this secret is for" />
</div>It starts 64 tall, about two lines, and grows with its text, down and never sideways. Add a line to see it grow.
Set aria-invalid, as on an input: the edge turns red. Link the hint with aria-describedby, so a screen reader reads the count too.
94 of 80 characters. Make it shorter.
A long line with no space in it, such as a key, wraps at any character and keeps the field in its container. Disabled has the hover fill and muted text.
Textarea takes every prop of a <textarea>, and adds none.