CheckboxCardGroup
Multi-select group of CheckboxCards presented as interactive cards.
Shares size, indicator, icon, and checked state with its items via context.
With checkedValues it is a Base UI CheckboxGroup (role="group") that
owns which cards with a value are checked.
Usage
Best practices
Use
CheckboxCardGroupfor multi-select cards andRadioCardGroupfor single-select - a checkbox group lets any number be on at once.Set
size/icon/indicatorSide/showIndicatoronce on the group; everyCheckboxCardreads them from context - don't repeat them per item.To control the set, give each card a
value, drivecheckedValues(astring[]) and toggle insideonCheckedChange(value, checked); withoutcheckedValueseach card keeps its ownchecked/defaultChecked.Each card is one tab stop and toggles with Space; checkboxes don't rove, so Tab (not the arrow keys) moves between cards.
Props
CheckboxCard
CheckboxCardGroup
Also exports
- const
checkboxCardAnatomy - component
CheckboxCardContent - component
CheckboxCardDescription - interface
CheckboxCardGroupProps - component
CheckboxCardIcon - interface
CheckboxCardProps - component
CheckboxCardTitle