Skip to main content

ChoiceList

Use s-choice-list to group related choices together, allowing single or multiple selections. Provides a structured way to present options to users.

boolean
Default: false

Whether multiple choices can be selected.

string[]

An array of the values of the selected options.

This is a convenience prop for setting the selected prop on child options.

Was this section helpful?

(event: <"s-divider">) => void
(event: <"s-divider">) => void
Was this section helpful?

Use s-choice to create individual selectable options within choice lists. Provides consistent styling and behavior for form selections.

boolean
Default: false

Disables the control, disallowing any interaction.

boolean
Default: false

Whether the control is active.

string

The value used in form data when the control is checked.

Was this section helpful?

Code

<s-choice-list>
<s-choice value="small">Small</s-choice>
<s-choice value="medium">Medium</s-choice>
<s-choice value="large">Large</s-choice>
</s-choice-list>

Preview