Field

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

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

States

Props

PropTypeDefaultDescription
labelReactNodeText label for the control.
descriptionReactNodeSupporting description text.
errorReactNodeError 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.
idstringId applied to the root element (auto-generated when omitted).
childrenReactElementContent 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