Skip to content

Field

A form field wrapper that renders a label, description, control slot, and validation status.

We'll never share your email.
<Field {...args} description="We'll never share your email.">
<input id="field-story" />
</Field>
<Field {...args}>
<input id="field-story" />
</Field>
<Field {...args}>
<input id="field-story" />
</Field>
<Field {...args}>
<input disabled id="field-story" />
</Field>
The label is visually hidden but still accessible.
<Field {...args}>
<input id="field-story" placeholder="Email" />
</Field>
Preference
<Field {...args}>
<div aria-labelledby="pref-label" role="radiogroup">
<label>
<input name="pref" type="radio" /> Email
</label>
<label>
<input name="pref" type="radio" /> Phone
</label>
</div>
</Field>
<Field {...args}>
<input id="field-story" />
</Field>
<Field {...args}>
<input id="field-story" />
</Field>
<Field {...args}>
<input id="field-story" type="password" />
</Field>
<Field {...args}>
<input id="field-story" placeholder="Password" type="password" />
</Field>
<Field {...args}>
<input id="field-story" />
</Field>
This email is already in use.
<Field {...args}>
<input id="field-story" />
</Field>
Email is available.
<Field {...args}>
<input id="field-story" />
</Field>
<Field {...args}>
<input id="field-story" />
</Field>
Your primary contact email.
<Field {...args}>
<input id="field-story" />
</Field>

A form field wrapper that renders a label, description, control slot, and validation status.

When isOptional: false, isRequired: false

PropTypeDefaultDescription
children*ReactNode—The form control rendered inside the field.
classNamestring—Additional CSS class names applied to the root element.
data-testidstring—Test ID applied to the root element.
descriptionReactNode—Supporting text rendered between the label and control.
descriptionIDstring—ID for the description element.
inputId*string—ID of the associated control.
isDisabledbooleanfalseWhether the associated control is disabled.
isLabelHiddenbooleanfalseWhether to visually hide the label and description.
isReadOnlybooleanfalseWhether the associated control is read-only.
label*string—Field label text.
labelAs'label' | 'span''label'HTML element used for the label. Use 'span' for group controls (e.g., radiogroup) where htmlFor cannot target a labelable element.
labelEndReactNode—Content shown at the end of the label row, such as a "Forgot password?" link. It renders outside the label element, so interacting with it does not focus the control and it is not part of the control's accessible name. It stays visible when isLabelHidden is true, on a row of its own.
labelIconIconComponent—Optional icon shown before the label.
labelIdstring—ID applied to the label element, useful for aria-labelledby.
labelTooltipReactNode—Tooltip content shown next to the label.
refRef<HTMLDivElement>—Ref forwarded to the root element.
statusFieldStatus—Validation status displayed below the control.
statusVariant"attached" | "detached"'attached'How the status message is positioned.
styleCSSProperties—Inline styles applied to the root element.
isOptionalfalse—
isRequiredfalse—

When isOptional: true, isRequired: false

PropTypeDefaultDescription
children*ReactNode—The form control rendered inside the field.
classNamestring—Additional CSS class names applied to the root element.
data-testidstring—Test ID applied to the root element.
descriptionReactNode—Supporting text rendered between the label and control.
descriptionIDstring—ID for the description element.
inputId*string—ID of the associated control.
isDisabledbooleanfalseWhether the associated control is disabled.
isLabelHiddenbooleanfalseWhether to visually hide the label and description.
isReadOnlybooleanfalseWhether the associated control is read-only.
label*string—Field label text.
labelAs'label' | 'span''label'HTML element used for the label. Use 'span' for group controls (e.g., radiogroup) where htmlFor cannot target a labelable element.
labelEndReactNode—Content shown at the end of the label row, such as a "Forgot password?" link. It renders outside the label element, so interacting with it does not focus the control and it is not part of the control's accessible name. It stays visible when isLabelHidden is true, on a row of its own.
labelIconIconComponent—Optional icon shown before the label.
labelIdstring—ID applied to the label element, useful for aria-labelledby.
labelTooltipReactNode—Tooltip content shown next to the label.
refRef<HTMLDivElement>—Ref forwarded to the root element.
statusFieldStatus—Validation status displayed below the control.
statusVariant"attached" | "detached"'attached'How the status message is positioned.
styleCSSProperties—Inline styles applied to the root element.
isOptional*true—
isRequiredfalse—

When isOptional: false, isRequired: true

PropTypeDefaultDescription
children*ReactNode—The form control rendered inside the field.
classNamestring—Additional CSS class names applied to the root element.
data-testidstring—Test ID applied to the root element.
descriptionReactNode—Supporting text rendered between the label and control.
descriptionIDstring—ID for the description element.
inputId*string—ID of the associated control.
isDisabledbooleanfalseWhether the associated control is disabled.
isLabelHiddenbooleanfalseWhether to visually hide the label and description.
isReadOnlybooleanfalseWhether the associated control is read-only.
label*string—Field label text.
labelAs'label' | 'span''label'HTML element used for the label. Use 'span' for group controls (e.g., radiogroup) where htmlFor cannot target a labelable element.
labelEndReactNode—Content shown at the end of the label row, such as a "Forgot password?" link. It renders outside the label element, so interacting with it does not focus the control and it is not part of the control's accessible name. It stays visible when isLabelHidden is true, on a row of its own.
labelIconIconComponent—Optional icon shown before the label.
labelIdstring—ID applied to the label element, useful for aria-labelledby.
labelTooltipReactNode—Tooltip content shown next to the label.
refRef<HTMLDivElement>—Ref forwarded to the root element.
statusFieldStatus—Validation status displayed below the control.
statusVariant"attached" | "detached"'attached'How the status message is positioned.
styleCSSProperties—Inline styles applied to the root element.
isOptionalfalse—
isRequired*true—