- Docs
- Components
- Forms
Textarea
Several lines, with the Input look. It grows with its content, and no script measures it.
- Import
- @qeetrix/react
- Status
- StableSince 0.0.2
- Renders
<textarea>Server-rendered- Tested
- WCAG 2.2 AAaxe on every pull request
01
Playground
Every prop, live, and the code it takes.
import { Field, Textarea } from "@qeetrix/react";
<Field label="Note">
<Textarea placeholder="e.g. Renewal due in November" maxRows={6} />
</Field>02
Grows as you type
From rows to maxRows, then it scrolls. CSS field-sizing does it: no script measures it.
<Field label="Note">
<Textarea rows={2} maxRows={6} defaultValue="Renewal due in November…" />
</Field>03
With a limit
Say the limit in the description; maxLength holds it.
Up to 200 characters. Your admin sees it.
<Field label="Reason for access" description="Up to 200 characters. Your admin sees it.">
<Textarea maxLength={200} placeholder="e.g. Quarter-end audit of payroll" />
</Field>04
Invalid, disabled, read-only
The same states as Input, from the field around it.
Add the PIN code.
<Stack gap="lg">
<Field label="Address" error="Add the PIN code."><Textarea defaultValue="12 MG Road, Bengaluru" /></Field>
<Field label="Address" disabled><Textarea defaultValue="12 MG Road, Bengaluru 560001" /></Field>
<Field label="Address"><Textarea readOnly defaultValue="12 MG Road, Bengaluru 560001" /></Field>
</Stack>