A component that allows selecting one or more options from a list. This is the only selection component: it covers radio groups, dropdowns, selects and multi-selects.
- labeloptional
- string or pathThe label for the group of options.
- variantoptional
- one of · multipleSelection | mutuallyExclusive · default "mutuallyExclusive"A hint for how the choice picker should be displayed and behave.
- optionsrequired
- listThe list of available options to choose from.
- valuerequired
- list or pathThe list of currently selected values. This should be bound to a string array in the data model.
- displayStyleoptional
- one of · checkbox | chips · default "checkbox"How the options are laid out: checkbox stacks them as full-width rows, chips wraps them as compact pills. It does not decide the mark drawn beside an option — variant does.
- filterableoptional
- boolean · default falseIf true, displays a search input to filter the options.
what your agent sends1 piece
{
"root": "root",
"dataModel": {
"channel": [
"email-and-push"
]
},
"components": [
{
"id": "root",
"component": "ChoicePicker",
"label": "Channel",
"variant": "mutuallyExclusive",
"options": [{ "label": "Email and push", "value": "email-and-push" }, { "label": "Email only", "value": "email" }],
"value": { "path": "/channel" }
}
]
}what your agent gets backas context
{
"channel": ["email-and-push"]
}