Use CheckboxGroup when someone can choose more than one option from a related set. It provides a
shared label, description, and validation message for its CheckboxField children.
Pass defaultValue to set the initial selection, or pass value with onChange to control it.
Pass a unique value to each CheckboxField. The group value is an array of the selected values.
Set size to provide a default size for its checkbox fields. A child's size takes precedence over
the group size. When neither sets a size, the group inherits Form.controlSize or uses medium.
The size changes the control without changing the label typography.
Set isRequired to require at least one selection, or pass validate to check the selected values.
Set isRequired or pass validate on a CheckboxField when that option needs its own rule. The
group shows these native validation messages below its options.
Pass errorMessage to CheckboxGroup for a controlled error from a form library or server. A
non-empty message marks the group invalid and takes precedence over native validation messages. The
description stays visible while the group is invalid. Read Validation for where
messages come from and how to write them.
By default, a required group shows a marker after its label. Read
Required fields for the necessityIndicator values.
Submit without selecting a day to see the validation message.
Use a visible label to name the group. When another part of the layout names it, pass
aria-labelledby. Pass aria-label when there is no visible group label. Each CheckboxField
keeps its own visible label and optional description.
Set isDisabled on the group to disable every option. An individual option cannot override a
disabled group with isDisabled={false}.
CheckboxGroupProps also accepts compatible DOM and ARIA attributes and event handlers for its rendered element.
Name
Type
Default
description
ReactNode
Default: —
Supporting text shown below the group label.
Optional helper text shown below the control.
errorMessage
ReactNode
Default: —
Validation message for a controlled error. A non-empty message marks the group invalid.
label
Exclude<ReactNode, boolean| null| undefined>
Default: —
Visible label. Pass non-empty, textual, non-interactive content. Place links and buttons
outside it, and associate external label content with aria-labelledby instead.
necessityIndicator
Default: —
Controls how the group label identifies required or optional values.
Controls how the label identifies required or optional values. Inherits from Form, or uses
'required-asterisk' when unset.
orientation
'vertical' | 'horizontal'
Default: 'vertical'
Controls whether options stack or wrap in rows.
size
Default: —
Default control size for its options. An option's explicit size takes precedence.