ChoiceList
The choiceList component presents multiple options for single or multiple selections. Use it when merchants need to choose from a defined set of options, such as filtering results or collecting preferences.
The component supports both single selection (radio button behavior) and multiple selection (checkbox behavior) modes. It offers multiple layout variants including list, inline, block, and grid formats to suit different space constraints and visual requirements.
Supported targets
- pos.
cart. line-item-details. action. render - pos.
customer-details. action. render - pos.
draft-order-details. action. render - pos.
exchange. post. action. render - pos.
home. modal. render - pos.
order-details. action. render - pos.
product-details. action. render - pos.
purchase. post. action. render - pos.
register-details. action. render - pos.
return. post. action. render
Supported targets
- pos.
cart. line-item-details. action. render - pos.
customer-details. action. render - pos.
draft-order-details. action. render - pos.
exchange. post. action. render - pos.
home. modal. render - pos.
order-details. action. render - pos.
product-details. action. render - pos.
purchase. post. action. render - pos.
register-details. action. render - pos.
return. post. action. render
Anchor to PropertiesProperties
Configure the following properties on the choiceList component.
Configure the following properties on the choice list component.
- Anchor to idididstringstring
A unique identifier for the element.
- Anchor to multiplemultiplemultiplebooleanbooleanDefault: falseDefault: false
Whether multiple choices can be selected.
- Anchor to valuesvaluesvaluesstring[]string[]
An array of the
values of the selected options.This is a convenience prop for setting the
selectedprop on child options.
Anchor to EventsEvents
The choiceList component provides event callbacks for handling user interactions. Learn more about handling events.
The choice list component provides event callbacks for handling user interactions. Learn more about handling events.
- Anchor to changechangechange(event: CallbackEvent<"s-choice-list">) => void(event: CallbackEvent<"s-choice-list">) => void
Callback when the user changes a choice. Fires simultaneously with onInput.
- Anchor to inputinputinput(event: CallbackEvent<"s-choice-list">) => void(event: CallbackEvent<"s-choice-list">) => void
Callback when the user changes a choice. Fires simultaneously with onChange.
CallbackEvent
- bubbles
boolean - cancelable
boolean - composed
boolean - currentTarget
HTMLElementTagNameMap[T] - detail
any - eventPhase
number - target
HTMLElementTagNameMap[T] | null
Anchor to ChoiceChoice
The Choice component creates options that let merchants select one or multiple items from a list of choices.
The choice component creates options that let merchants select one or multiple items from a list of choices.
- Anchor to disableddisableddisabledbooleanbooleanDefault: falseDefault: false
Disables the control, disallowing any interaction.
- Anchor to idididstringstring
A unique identifier for the element.
- Anchor to selectedselectedselectedbooleanbooleanDefault: falseDefault: false
Whether the control is active.
- Anchor to valuevaluevaluestringstring
The value used in form data when the control is checked.
Anchor to ExamplesExamples
Anchor to Best practicesBest practices
- Choose appropriate selection modes: Use single selection for mutually exclusive options. Enable
multiplewhen merchants can select more than one. - Write clear, concise choice labels: Keep labels short but descriptive enough that merchants understand each option without additional explanation.
Anchor to LimitationsLimitations
choiceList component types other than Choice can't be used as options within the choice list.