Skip to main content

Examples

Default

Error Without Message

Without Label

All States

Full Width

Props

TextArea

A multi-line text input with optional label, helper/error text, and clear button. Provide at least one of label, aria-label, or aria-labelledby for accessibility — a console warning is emitted in development if none are set.
boolean
default:"false"
Whether the text area is in an error state.
string
Error message displayed below the textarea. Shown instead of helperText when error is true.
boolean
default:"false"
Whether the text area stretches to fill its container width.
string
Helper text displayed below the textarea. Replaced by errorMessage when error is true.
string
Label text displayed above the textarea. Also used as the accessible name.
number
Maximum number of rows (lines) for the textarea.
number
Minimum number of rows (lines) for the textarea.
(() => void)
Callback fired when the clear button is clicked. Note: onChange is also called with an empty value when clearing.
boolean
default:"false"
Whether the textarea can be resized by the user.
boolean
default:"false"
Whether to show a clear button when text is present.
"32" | "40" | "48"
default:"48"
Minimum height of the text area in pixels.
boolean
default:"false"
Whether the text area is validated.

Exported types

Also exported from @fanvue/ui: TextAreaProps, TextAreaSize.
Setup: Installation · Theming