RadioCardGroup
Radio group whose options are full-size selectable cards (Base UI RadioGroup).
Each RadioCard is itself the radio, so the group is one tab stop and the
arrow keys move the selection between cards.
Shares size/icon/indicatorSide/showIndicator with every RadioCard
through context, so set them once here. Controlled via value/onValueChange,
uncontrolled via defaultValue; layout picks a stacked grid or an inline
wrap.
Usage
Best practices
Use
RadioCardGroupfor single-select cards andCheckboxCardGroupfor multi-select - a radio group enforces exactly one choice.Set
size/icon/indicatorSide/showIndicatoronce on the group; eachRadioCardreads them from context - don't repeat per item.Drive selection with
value/onValueChange(controlled) ordefaultValue(uncontrolled); uselayout="inline"for a wrapping row instead of the stacked grid.Label the group (e.g.
aria-labelor aFieldwith aFieldLabel) - Tab lands on the selected card and the arrow keys move between cards.
Props
RadioCard
RadioCardGroup
Also exports
- component
RadioCardContent - component
RadioCardDescription - interface
RadioCardGroupProps - component
RadioCardIcon - interface
RadioCardProps - component
RadioCardTitle