Skip to main content

Function: FieldGroup()

FieldGroup(__namedParameters): Element

Defined in: components/FieldGroup/FieldGroup.tsx:83

A composite field: one label over several controls, as a role="group" region named by aria-labelledby — an expiry's month/year pair, a range's from/to (FORMS.md §2, Level 3).

The controls sit in one inline row and share it equally. Inside a labelPosition="side" Form the group becomes a subgrid row like any other field: its label joins the shared label column, its controls the control column.

Validation stays with each inner field — a group has no validation state of its own, because React Aria's field contexts are supplied per root and the platform validates per control.

Parameters

ParameterType
__namedParametersFieldGroupProps

Returns

Element

Example

<FieldGroup label="Expiry">
<Select aria-label="Expiry month"></Select>
<Select aria-label="Expiry year"></Select>
</FieldGroup>