Text Area
A multi-line plain-text editing control. Pair it with Field to connect its label, description, and errors in a form.
When to use
- Accept several lines of free-form text, such as a comment on a review or a feedback form.
- Prefer
Inputwhen the text fits on one line.
Appearance
Set appearance="monospaced" to render the text in a fixed-width font.
Validation
Set validation to show the validation status of the text area.
Without a Field
Render the control on its own, and give it an accessible name with aria-label.
Examples
TextArea in a form with client-side validation
In this example, the TextArea is used in a form with client-side validation. The form is built using @tanstack/react-form and zod for validation. The form accepts user feedback and validates the input before submission.
API Reference
TextArea
A multi-line plain-text editing control.
All props from textarea, plus: