Skip to main content
  1. Docs
  2. Components
  3. 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

textarea.tsx
// 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.

PropTypeDefaultWhat it does
rowsnumber3Its height before it grows, in lines.
maxRowsnumberno limitThe most it grows to; then it scrolls.
value · defaultValuestring—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-slotElementWhat 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.

note.tsx
<Field label="Note">
  <Textarea rows={3} maxRows={8} name="note" />
</Field>
Next — TextareaAccessibility