Skip to content

CheckboxGroup

A controlled checkbox group for multi-value selection.

Notification channelsChoose any channels that apply.
Best for detailed updates.
<CheckboxGroup
description="Choose any channels that apply."
label="Notification channels"
value={['email', 'push']}
/>
Notification channelsChoose any channels that apply.
Best for detailed updates.
<CheckboxGroup
description="Choose any channels that apply."
label="Notification channels"
value={['email', 'push']}
orientation="horizontal"
/>
TeamsChoose the teams that should receive access.
<WrappingRowStory {...args} />
Notification channelsChoose any channels that apply.
Best for detailed updates.
<CheckboxGroup
description="Choose any channels that apply."
label="Notification channels"
value={['email', 'push']}
size="sm"
/>
Notification channelsChoose any channels that apply.
Best for detailed updates.
<CheckboxGroup
description="Choose any channels that apply."
label="Notification channels"
value={['email', 'push']}
size="lg"
/>
Notification channelsChoose any channels that apply.
Best for detailed updates.
<CheckboxGroup
description="Choose any channels that apply."
label="Notification channels"
value={['email', 'push']}
isDisabled
/>
Notification channelsChoose any channels that apply.
<ItemDisabledStory {...args} />
Notification channelsRequiredChoose any channels that apply.
Best for detailed updates.
<CheckboxGroup
description="Choose any channels that apply."
label="Notification channels"
value={['email', 'push']}
isRequired
/>
Notification channelsOptionalChoose any channels that apply.
Best for detailed updates.
<CheckboxGroup
description="Choose any channels that apply."
label="Notification channels"
value={['email', 'push']}
isOptional
/>
Notification channelsChoose any channels that apply.
Best for detailed updates.
<CheckboxGroup
description="Choose any channels that apply."
label="Notification channels"
value={[]}
status={{ message: 'Select at least one notification channel.', type: 'error', }}
/>
Notification channelsChoose any channels that apply.
Recommended
<WithEndContentStory {...args} />
Notification channelsChoose any channels that apply.
<WithIconsStory {...args} />
Notification channelsChoose any channels that apply.
Best for detailed updates.
SMS may incur carrier charges.
<CheckboxGroup
description="Choose any channels that apply."
label="Notification channels"
value={['email', 'push']}
status={{message: 'SMS may incur carrier charges.', type: 'warning'}}
/>
Notification channelsChoose any channels that apply.
Best for detailed updates.
Preferences saved.
<CheckboxGroup
description="Choose any channels that apply."
label="Notification channels"
value={['email', 'push']}
status={{message: 'Preferences saved.', type: 'success'}}
/>

A controlled checkbox group for multi-value selection.

When isOptional: false, isRequired: false

PropTypeDefaultDescription
children*ReactNodeCheckbox items to render.
classNamestringAdditional CSS class names applied to the field root.
data-testidstringTest ID applied to the field root.
descriptionReactNodeSupporting text displayed below the label.
htmlNamestringHTML name attribute shared by checkbox inputs for native form submission.
isDisabledbooleanfalseWhether all checkbox items are disabled.
isLabelHiddenbooleanfalseWhether to visually hide the label.
label*stringLabel text for the checkbox group.
labelTooltipReactNodeTooltip content shown next to the label.
onChange*(value: string[]) => voidCallback fired when the selected values change. Memoize with useCallback to avoid unnecessary re-renders of checkbox items.
orientation"horizontal" | "vertical"'vertical'Layout direction of the checkbox items.
refRef<HTMLDivElement>Ref forwarded to the field root.
size"sm" | "md" | "lg"'md'Size of the checkbox controls.
statusInputStatusValidation status displayed below the group.
styleCSSPropertiesInline styles applied to the field root.
value*string[]The currently selected values.
isOptionalfalse
isRequiredfalse

When isOptional: true, isRequired: false

PropTypeDefaultDescription
children*ReactNodeCheckbox items to render.
classNamestringAdditional CSS class names applied to the field root.
data-testidstringTest ID applied to the field root.
descriptionReactNodeSupporting text displayed below the label.
htmlNamestringHTML name attribute shared by checkbox inputs for native form submission.
isDisabledbooleanfalseWhether all checkbox items are disabled.
isLabelHiddenbooleanfalseWhether to visually hide the label.
label*stringLabel text for the checkbox group.
labelTooltipReactNodeTooltip content shown next to the label.
onChange*(value: string[]) => voidCallback fired when the selected values change. Memoize with useCallback to avoid unnecessary re-renders of checkbox items.
orientation"horizontal" | "vertical"'vertical'Layout direction of the checkbox items.
refRef<HTMLDivElement>Ref forwarded to the field root.
size"sm" | "md" | "lg"'md'Size of the checkbox controls.
statusInputStatusValidation status displayed below the group.
styleCSSPropertiesInline styles applied to the field root.
value*string[]The currently selected values.
isOptional*true
isRequiredfalse

When isOptional: false, isRequired: true

PropTypeDefaultDescription
children*ReactNodeCheckbox items to render.
classNamestringAdditional CSS class names applied to the field root.
data-testidstringTest ID applied to the field root.
descriptionReactNodeSupporting text displayed below the label.
htmlNamestringHTML name attribute shared by checkbox inputs for native form submission.
isDisabledbooleanfalseWhether all checkbox items are disabled.
isLabelHiddenbooleanfalseWhether to visually hide the label.
label*stringLabel text for the checkbox group.
labelTooltipReactNodeTooltip content shown next to the label.
onChange*(value: string[]) => voidCallback fired when the selected values change. Memoize with useCallback to avoid unnecessary re-renders of checkbox items.
orientation"horizontal" | "vertical"'vertical'Layout direction of the checkbox items.
refRef<HTMLDivElement>Ref forwarded to the field root.
size"sm" | "md" | "lg"'md'Size of the checkbox controls.
statusInputStatusValidation status displayed below the group.
styleCSSPropertiesInline styles applied to the field root.
value*string[]The currently selected values.
isOptionalfalse
isRequired*true

An individual checkbox option within a `CheckboxGroup`.

PropTypeDefaultDescription
classNamestringAdditional CSS class names applied to the item root.
data-testidstringTest ID applied to the input element.
descriptionReactNodeSupporting text displayed below the item label.
endContentReactNodeContent rendered after the label and description.
endContentPositionCheckboxInputProps['endContentPosition']'inline'Where to place endContent within the item.
isDisabledbooleanfalseWhether this checkbox item is disabled.
label*stringLabel text for the checkbox item.
refRef<HTMLInputElement>Ref forwarded to the input element.
startContentReactNodeContent rendered after the checkbox control and before the label.
styleCSSPropertiesInline styles applied to the item root.
value*stringValue represented by this checkbox item.