Skip to content

Text Area

⋯

Textarea renders a native multiline control with the 80px minimum height, 8px radius, and Default, Focused, Filled, Error, and Disabled treatments in the Input design.

import { Textarea } from "@nesra/ui/textarea";
export function MessageField() {
return <Textarea label="Message" name="message" placeholder="Type your message here" required />;
}

Textarea is also exported from @nesra/ui.

error adds the destructive border and ring, which stay while the textarea has focus. Colors follow the field state colors in Light and Dark.

This is a hint text to help user

Textarea forwards native value, onChange, and maxLength props. The counter belongs to the page.

0 / 160 characters

name and required work with a regular form. The textarea can be resized vertically.

Share one improvement you would like to see.

Your message will appear here after submission.
  • label associates visible text with the native textarea. Give a bare Textarea an accessible name.
  • description and error provide associated text. The form decides when to set error.
  • The forwarded ref points to the textarea. Native name, required, disabled, value, and defaultValue work as on a regular textarea.
Prop Type Default Effect
label ReactNode — Adds a visible Base UI Field label.
description ReactNode — Adds help text below the textarea.
error FieldError — Displays an associated validation message.

Textarea also accepts native textarea props, including name, required, disabled, value, defaultValue, onChange, and maxLength. Its ref points to the native textarea. See the FieldError type for validation matching.

The visual values come from the color roles, typography roles, layout scale, and shape and elevation tokens.