Field

Form-field wrapper composing label, control, description, and error

Category: inputs · WCAG 2.2-AA · form, layout, validation, accessibility

States

Props

PropTypeDefaultDescription
labelReactNode—Text label for the control.
hintReactNode—Alias of `description` — the name the eight form controls use for the same supporting text. Neither is deprecated.
descriptionReactNode—Supporting text under the control, wired via aria-describedby. `hint` is accepted as an alias.
errorReactNode—Error message shown when the value is invalid.
requiredbooleanfalseWhen true, marks the field as required.
disabledbooleanfalseWhen true, disables the control and removes it from the tab order.
idstring—Id applied to the root element (auto-generated when omitted).
childrenReactElement—Content rendered inside the component.

Design tokens

When to use

When not to use

How to build an accessible Field in React →

Examples

Basic

<Field label="Email"><Input type="email" /></Field>

With description

<Field label="Email" description="We never share it."><Input /></Field>

With error

Sets aria-invalid on the control and announces the error via role="alert".

<Field label="Email" error="Email is required" required><Input /></Field>

Related components

← Back to docs