Field: Status
<FieldStatus /> draws a check once an edited field passes validation, and shows an alert icon while it fails. It follows the field's validationMode, so it never judges a field before validation has run.
Try HX-2026.
This adds the example as components/examples/field/status.tsx, together with the Field component and the HextaUI theme tokens it needs.
pnpm dlx shadcn@latest add https://hextaui.com/r/field-status.jsonTo add only the component, follow the Field installation.
Props in this example
The Field props this example sets, from the API reference.
| Prop | Type | Default |
|---|---|---|
validationMode | "onSubmit" | "onBlur" | "onChange" | "onSubmit" |
| Prop | Type | Default |
|---|---|---|
matchShow only for this validity problem. true always shows it. | boolean | "valueMissing" | "typeMismatch" | "tooShort" | "tooLong" | "patternMismatch" | "rangeOverflow" | "rangeUnderflow" | "stepMismatch" | "badInput" | "customError" | "valid" | – |
Every prop is in the Field API reference.
- Input
- Validation
- Custom validation
- Required and optional
- Character count
- Errors from a form library or server
- Checkboxes
- Choice cards
- Fieldset
- Responsive
- Disabled
- Long content
- Right to left
See them all, with keyboard support and accessibility notes, on the Field page.
- InputA text input with three sizes, invalid and read-only states, native validation styling and a 16px touch font so phones never zoom in.
- MotionThe easing curves, durations and reduced-motion check every component animates with, plus hooks for size morphs and sliding highlights.
- SeparatorA hairline that divides content horizontally or vertically, with an optional label and a decorative mode for purely visual lines.
- useComposedRefKeeps a ref to your own element while still forwarding it to whatever ref the parent passed in.
- useMergedRefCombines any number of callback and object refs into one, with React 19 ref cleanup for each of them.
- CalendarA date grid for single, range and multiple selection, with sliding months, range previews and touch-sized days.