Skip to main content

Examples

Default

Error Without Message

Side Label (all sizes)

Without Label

All States

Props

TextField

A text input field with optional label, helper/error text, icon slots, and side labels. Use leftLabel / rightLabel for fixed unit or prefix affordances (currency symbol, country code, domain suffix). Provide at least one of label, aria-label, or aria-labelledby for accessibility — a console warning is emitted in development if none are set.
ReactNode
Trailing interactive element pinned to the right edge — typically a Chip or Button (the “with button” field type). Reduces the right padding so the control sits flush, and clicks on it do not steal focus from the input.
boolean
default:"false"
Whether the text field is in an error state.
string
Error message displayed below the input. Shown instead of helperText when error is true.
boolean
default:"false"
Whether the text field stretches to fill its container width.
string
Helper text displayed below the input. Replaced by errorMessage when error is true.
string
Label text displayed above the input. Also used as the accessible name.
ReactNode
Icon element displayed at the left side of the input.
ReactNode
Fixed, non-editable label pinned inside the left edge of the field — for a prefix such as a currency symbol or country code.
ReactNode
Icon element displayed at the right side of the input.
ReactNode
Fixed, non-editable label pinned inside the right edge of the field — for a unit or suffix such as a currency code or domain.
"32" | "40" | "48"
default:"48"
Height of the text field in pixels.
boolean
default:"false"
Whether the text field is validated.

Exported types

Also exported from @fanvue/ui: TextFieldProps, TextFieldSize.
Setup: Installation · Theming