Skip to content
Components / Controls

Field

Connects a label, hint and error to one control.

@fabrials/ui
Loading state

Shown in the account list.

Installation

  1. Import the control from @fabrials/ui, after setting the app up.

    TypeScript
    import { Field } from "@fabrials/ui";

API reference

Prop / exportTypeDescription
labelReactNodeVisible name.
descriptionReactNodeHint announced with the control.
errorReactNodeShown after a failed check. Marks the control invalid.
children(props) => ReactNodeReceives id and aria attributes to spread onto the control.

Behavior

The host decides when a value is invalid. Field only wires the accessible relationship.

Accessibility

Keyboard and contrast
Keep visible labels, keyboard focus and status announcements when customizing. These components inherit your theme; maintain sufficient contrast in both color modes. The preview is keyboard operable.