Text field

Text fields let users enter text into a UI

Usage

TextField allows users to enter and edit text. It supports both controlled (value) and uncontrolled (defaultValue) usage.

import { TextField } from "@udixio/ui-react"
<TextField label="Email" name="email" type="email" placeholder="you@company.com" />

Variants

  • filled (default)
  • outlined

Leading/trailing icon and suffix

Use leadingIcon, trailingIcon, or suffix for extra affordances.

Multi-line

Set multiline for an auto-growing textarea.

Error and supporting text

Show validation and helper text with errorText and supportingText.

Controlled vs uncontrolled

Autofocus

Use the autoFocus prop to automatically focus the TextField on mount.