Choice
Options within the ChoiceList component. This component is used in conjunction with the ChoiceList component to render the options as either radio buttons or checkboxes.
Preview

Code example
render('Checkout::Dynamic::Render', () => {
return (
<ChoiceList name="choice" type="checkbox" value="first" onChange={(value) => {
console.log(`onChange event with value: ${value}`);
}}>
<Choice id="first">Ship</Choice>
<Choice id="second">Pickup</Choice>
</ChoiceList>
);
});
ChoiceProps
tip
Optional properties are marked with a ?. Properties without a ? are required.
id
string
A unique identifier for the UI component. The property is required.
disabled?
boolean
Indicates whether the component is disabled. Valid values are:
true: Disabled.false: Available.
accessibilityLabel?
string
A label for this component. Configuring this feature directly sets the aria-label attribute, providing accessibility information for screen readers.
Was this article helpful to you?