Skip to content
Zuno UI
Explore components
EXPLORE
Actions
Forms
Layout
Navigation
Data display
Feedback
Overlays
RESOURCES
Components/Textarea

Textarea

Multi-line text input with adjustable height and accessible states.

Base UI reference ↗

Installation

Run it from the root of a project already set up with zunoui init.

npx zunoui@latest add textarea

Dependencies

What add textarea installs alongside the component. The CLI skips any you already have in a compatible version.

ZUNO registry

  • @zuno/utils

npm

Examples

3 examples · 1 component
textarea

Include any details you find useful.

Textarea with validation

Linked label, help text and error. Try submitting the empty field.

textarea

Disabled textarea

Keeps the content and the control's native semantics.

textarea

Read-only textarea

Keeps the content and the control's native semantics.

API reference

Keeps the props, events and refs of the matching Base UI primitive, plus ZUNO's styles.

PropTypeDefault
rows

Initial height in lines; can be resized vertically.

number4
value / defaultValue

Controlled value or initial value.

string—
onValueChange

Receives the updated text.

(value, eventDetails) => void—
disabled / readOnly

Disables editing or makes the textarea read-only.

booleanfalse

States

The states that apply to this component and their visual treatment.

StateTreatment
RestIdentifiable 1 px border (input token).
Focus visible2 px ring outline merged with the border.
InvalidInside Field, destructive border and a text error.
ResizableGrows with its content; vertical resize without clipping the text.
Disableddisabled prevents interaction and focus.
Read-onlyreadOnly keeps the content selectable.

Accessibility

Link the control to a label as with Input. Accepts native textarea props, including required, maxLength, ref and onChange.

Keep focus visible and explain errors with text; the control grows with its content without clipping it.