- 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
Import
// From the package: a build keeps only what it uses.
import { Textarea, Field } from "@qeetrix/react";
// Or from its own path.
import { Textarea, Field } from "@qeetrix/react/input";02
Props
And every native attribute of the element it renders.
| Prop | Type | Default | What it does |
|---|---|---|---|
rows | number | 3 | Its height before it grows, in lines. |
maxRows | number | no limit | The most it grows to; then it scrolls. |
value · defaultValue | string | — | Controlled, or to start with. |
onValueChange | (value, details) => void | — | Called with the new value. |
placeholder · maxLength · disabled · readOnly · required | … | — | As on a <textarea>. |
03
Parts
Each part carries a data-slot, for tests and placement.
| data-slot | Element | What it is |
|---|---|---|
textarea | <textarea> | The box itself; ref lands here. |
04
Grow with care
Where field-sizing isn't supported, it keeps rows and can be dragged taller.
<Field label="Note">
<Textarea rows={3} maxRows={8} name="note" />
</Field>