Components
Field
Flexible field container (Base UI Field.Root) that arranges label and
content in various orientations. Its parts wire themselves to the control:
FieldLabel gets htmlFor, and FieldDescription/FieldError join the
control's aria-describedby.
Usage
Best practices
Set
invalidon theField, not on each control - it setsaria-invalidon the field'sInput/InputGroupInput/Textareaand turns theFieldLabeldestructive.Compose the documented parts (
FieldLabel,FieldContent,FieldError,FieldDescription) around one control - the label'shtmlForand the control'saria-describedbyare wired for you, so there are no ids to pass.Use
orientation="responsive"for a label-beside-control that collapses to stacked on mobile, rather than duplicating the field per breakpoint.
Props
Field
FieldError
Also exports
- const
fieldAnatomy - component
FieldContent - component
FieldDescription - component
FieldGroup - const
fieldGroupAnatomy - component
FieldLabel - const
fieldVariants
Anatomy
Composition
Used by