Components
Textarea
Multi-line text field with vertical resize, two surface variants and Field validation state.
import { Textarea } from "@openperf/deft";
<Textarea.Root aria-label="Description" name="description" />;Sizing
The textarea fills the width of its container, is at least 80px tall and resizes vertically only. Raise the minimum height through className, for example className="min-h-40".
Variants
variant and font work as on Input: field is for an inset surface, and mono is for code-like text. Unlike Input, the textarea has no icon, prefix or extra.
In a field
Inside a Field the textarea reads the field state and shows a danger ring while the field is invalid. Field.Label names it; without one, set aria-label.
import { Field, Textarea } from "@openperf/deft";
<Field.Root>
<Field.Label>Description</Field.Label>
<Textarea.Root maxLength={2000} name="description" />
</Field.Root>;API
Prop
Type