Choice Group

Choice Group is the parent component for rich selectable objects, such as selectable buttons, icon buttons, cards, tiles, and color swatches.

Use Choice Group...

  • When more content flexibility is needed than Radio Group or Checkbox Group can provide.
  • For selectable, button-like options (ChoiceButton and ChoiceIconButton).
  • For rich content in a selectable container (ChoiceCard).
  • For selecting SWAN tile components (ChoiceTile).
  • For selectable color swatches (ChoiceColorSwatch).

Don't use Choice Group...

Selection Mode

Single

Use selectionMode=”single” to only allow one selection from the group.

The preview has been updated.

Multiple

Use selectionMode=”multiple” to only multiple selections from the group.

The preview has been updated.

Disabled

Use disabled on any Choice subcomponent to prevent it from being selected or deselected. To disable the entire group, use disabled on each item.

The preview has been updated.

Labels, errors, and helper text

Use the FormField components to add a label, error message, or helper text to a Choice Group. They apply the necessary ARIA attributes for you, so you don't need to add them yourself.

Managing State

Controlled

Single

selectedValue is the value of the currently selected Choice, or an empty string ('') if nothing is selected. onSelectedValueChange receives the newly selected value and the native change event. Update your state in the handler so the group reflects the new selection.

The preview has been updated.

Multiple

selectedValues is an array of the values of the currently selected Choice components, or an empty array ([]) if nothing is selected. onSelectedValuesChange receives the updated array and the native change event. Update your state in the handler so the group reflects the new selection.

The preview has been updated.

Uncontrolled

Omit selectedValue/selectedValues to allow the browser to manage the state. Optionally, use defaultSelectedValue/defaultSelectedValues to set the initially selected value(s), and/or pass onSelectedValueChange/onSelectedValuesChange to react to changes (for example, to track the selection) without taking over the state.

The preview has been updated.

Accessibility

ChoiceGroup must have a localized accessible name.

Use a FormLabel to provide a visible and accessible name (recommended, see Labels, helpers, and error text). Alternatively, use custom ARIA labels (see Accessibility guidelines).

Layout and spacing

ChoiceGroup uses a sensible default layout for its subcomponents. To customize the layout, compose the options inside a FlexBox with gap between-controls, or a nested GridContainer.

The preview has been updated.

Subcomponents

ChoiceButton

Use ChoiceButton for compact choices that should feel like selectable buttons, such as sizes, quantities, or short text options.

The preview has been updated.

ChoiceIconButton

Use ChoiceIconButton for icon-only choices that are universally understood actions such as delete, download, and edit.

The preview has been updated.

Tooltip

Refer to IconButton tooltip for usage guidelines.

ChoiceCard

Use ChoiceCard for richer selectable content.

The preview has been updated.

Indicator

Use indicatorMode and indicatorPosition to customize the visibility and location of the radio or checkbox indicator. Defaults to inline, top-left.

The preview has been updated.

Full Bleed

Use fullBleed to expand the content to the edges of the card.

The preview has been updated.

Even Height

Use evenHeight to expand the height to fill its container.

The preview has been updated.

When the Choice Card contains a covering link, the surface activates that link while the indicator selects the option. Do not hide the indicator.

The preview has been updated.

ChoiceTile

Use ChoiceTile to make supported SWAN tile components selectable while preserving tile-specific selected styling. Supported tile components are currently FileTile and components built using BaseTile (e.g. TemplateTile). Do not use ChoiceTile as a general-purpose wrapper for custom content.

The preview has been updated.

Indicator

Use indicatorMode and indicatorPosition to customize the visibility and location of the radio or checkbox indicator. Defaults to overlay, top-left.

The preview has been updated.

When the Choice Tile contains a covering link, the surface activates that link while the indicator selects the option. Do not hide the indicator.

The preview has been updated.

ChoiceColorSwatch

Use ChoiceColorSwatch inside ColorSwatches when the selectable value is represented by a color swatch. ChoiceColorSwatch takes the same props as ColorSwatch.

The preview has been updated.

Props

See core props for additional props that can be applied to each of these components. Each component also accepts the React-equivalent native HTML attributes of the element it renders, unless a listed prop replaces one or a note says otherwise.
ChoiceGroup
Renders <div>.
proptyperequireddefault
selectionMode
Renders the group as checkboxes (`role="group"`); any number of choices may be selected at once. Renders the group as mutually-exclusive radio buttons (`role="radiogroup"`); only one choice may be selected.
"multiple""single"
true
null
selectedValues
The currently selected values, or `[]` if nothing is selected. Used when controlling the state of the component.
string[]
false
null
defaultSelectedValues
The default selected values. Used when not controlling the state of the component.
string[]
false
null
onSelectedValuesChange
Called with the updated selection when a `Choice` within this group is toggled.
((selectedValues: string[], event: ChangeEvent<HTMLInputElement, Element>) => void)
false
null
name
The shared `name` attribute for the group's `Choice` inputs. Optional and unset by default -- checkboxes don't need one to behave correctly. The shared `name` attribute for the group's `Choice` inputs. Optional -- auto-generated if omitted, since radios need a shared `name` for native exclusivity. Not applied when `overrideKeyboardNav` is active -- an `<input type="button">` has no selected value to submit with `FormData`.
string
false
null
overrideKeyboardNav
Keyboard override is only available in single-select groups. Uses the native radio-group keyboard behavior. For single-select groups that need Tab to browse options and Enter/Space to select. Options render as inputs with type="button" and role="radio", while the group remains a radiogroup. Not recommended for general use due to accessibility limitations: the keyboard behavior does not follow the WAI-ARIA APG radiogroup keyboard pattern, so assistive tech will expect the native arrow-to-select behavior. @see docs /solutions/best-practices/choice-group-keyboard-override-2026-09-30.md
boolean
false
null
selectedValue
The currently selected value, or `''` if nothing is selected. Used when controlling the state of the component.
string
false
null
defaultSelectedValue
The default selected value. Used when not controlling the state of the component.
string
false
null
onSelectedValueChange
Called with the newly selected value and the native radio input's change event. Called with the newly selected value and the option input button's click event.
((selectedValue: string, event: ChangeEvent<HTMLInputElement, Element>) => void)((selectedValue: string, event: MouseEvent<HTMLInputElement, MouseEvent>) => void)
false
null
ChoiceButton
Renders <div>. The ref and selection attributes go to its inner control.
proptyperequireddefault
value
A string representing the value of this choice.
string
true
null
ChoiceCard
Renders <div>. The ref and selection attributes go to its inner control.
proptyperequireddefault
value
A string representing the value of this choice.
string
true
null
fullBleed
Whether the content should expand to the edges of the card.
boolean
false
false
evenHeight
Whether the card should stretch its height to fill a stretching parent row, for example a FlexBox or GridContainer Row.
boolean
false
false
indicatorPosition
The placement of the selection indicator.
ChoiceIndicatorPosition
false
'top-left'
indicatorMode
Whether the selection indicator floats over content, reserves space beside it, or is hidden.
ChoiceIndicatorMode
false
'inline'
ChoiceColorSwatch
Renders <div>. The ref and selection attributes go to its inner control.
proptyperequireddefault
value
A string representing the value of this choice.
string
true
null
accessibleText
Localized text shown in the tooltip and used as the default accessible name.
string
true
null
primaryColor
The main color of the swatch. Accepts a css color value. Passing `transparent` displays a custom checkerboard visual, when not used in a gradient.
ColorSwatchColornull
false
transparent
secondaryColor
The optional secondary color of the swatch. Accepts a css color value. Passing `transparent` displays a custom checkerboard visual, when not used in a gradient.
ColorSwatchColornull
false
null
tertiaryColor
The optional tertiary color of the swatch. Accepts a css color value. Passing `transparent` displays a custom checkerboard visual, when not used in a gradient.
ColorSwatchColornull
false
null
backgroundImage
URL for a background image for the swatch.
stringnull
false
null
gradient
Configures a gradient between the primary and secondary colors. By default shows the two colors stacked but separate
"linear""radial"null
false
null
ChoiceIconButton
Renders <div>. The ref and selection attributes go to its inner control.
proptyperequireddefault
tooltip
Localized text shown in the visual tooltip and used as the default accessible name.
string
true
null
value
A string representing the value of this choice.
string
true
null
ChoiceTile
Renders <div>. The ref and selection attributes go to its inner control.
proptyperequireddefault
value
A string representing the value of this choice.
string
true
null
indicatorPosition
The placement of the selection indicator. List-layout FileTiles center it vertically beside their content.
"top-left""top-right"
false
'top-left'
indicatorMode
Whether the selection indicator floats over content or is hidden. ChoiceTile does not support inline placement.
"none""floating"
false
'floating'

Related