Skip to main content
This component is returned by useForm().
A <Fieldset /> groups related form inputs together under a descriptive legend. It can contain either:
  • A single <RadioGroup />
  • Multiple <Checkbox /> inputs
When checkboxes are wrapped in a <Fieldset />, their labels are rendered on the right side of the checkbox instead of above it.
A <Fieldset /> should contain either a single <RadioGroup /> or multiple <Checkbox /> inputs, but not mixed.

Example with RadioGroup

fieldset-radio-dialog.tsx

Example with Checkboxes

fieldset-checkbox-dialog.tsx

Props

legend
string
required
The legend text for the fieldset, which acts as a label for the group of inputs.
children
React.ReactNode
required
Either a single <RadioGroup /> or multiple <Checkbox /> inputs.
Do not mix <RadioGroup /> and <Checkbox /> components within the same <Fieldset />.