Description
- A fieldset is a semantic container that groups related form elements such as text input, dropdown, and checkbox components.
- Includes a legend which helps users to understand the relationship between the grouped fields. For example, address details or personal information.
- Improves form structure and accessibility by providing visual and logical organisation.
- To see how fieldset is used with other components in a form, please see the Form pattern.
Anatomy
Anatomy
Size
- Fieldset is available in 3 sizes: Small (S), Medium (M), and Large (L).
- Each size defines:
- The legend size (typography and spacing).
- The component size for all child inputs inside the fieldset.
- The child label size for each input.
- The padding and spacing between the legend and its components, optimized for that size.
Variations
Horizontal
Flexbox
Vertical
Vertical group
States
Component-specific states
Error state - per input
Error state - group
Examples
Here are some common related input groups built using a fieldset. Both are available in Figma.
Address
Fieldset: Address
Decimal dropdown
Previously known as "Numeral input: dropdown".
Fieldset: Decimal dropdown
Dos and don'ts
Do
Don't