choice
A question the user answers by tapping: one pick, or several.
A question on the page, answered with a tap. choice is how the copilot asks for the one thing it needs before it can answer well, and how it lets someone pick several things at once: one pick from a few chips ("Where do you mostly run?"), or one or several from a list whose rows can carry a subtitle and a picture ("Which items are you returning?").
The pick goes back by id, not as a sentence, and the server checks it against the block it drew: an id the block does not offer, more picks than it allows, or a block already answered is refused. Once answered, the block folds into the question and what was picked.
Re-rendered in the browser from the SDK’s own scales. Not a screenshot.
Shapes
single, aschipsor alist: a tap is the answer.multi, as alist: rows tick on and off and the button under the list sends them, betweenmin_selected(1 by default) andmax_selected(all by default).otheradds a last row the user can write their own answer in.skipadds a way to answer without picking ("No preference").
When not to use it
Not for a payment method or anything else a confirmation should carry. Not for something the copilot can look up itself. One question at a time: a second follows on the next page.
Props
Every block also carries type and a required fallback_text of 1 to 300 characters.
| Prop | Type | Required | Constraints |
|---|---|---|---|
question | string | Yes | 1 to 120 characters. |
hint | string | No | Up to 160 characters. |
mode | single | multi | Yes | None |
style | chips | list | No | None |
options | array | Yes | 2 to 12 entries. |
options[].id | string | Yes | 1 to 64 characters. |
options[].label | string | Yes | 1 to 40 characters. |
options[].subtitle | string | No | Up to 80 characters. |
options[].icon | string | No | Up to 40 characters. |
options[].image_url | string | No | None |
min_selected | integer | No | 1 to 12. |
max_selected | integer | No | 1 to 12. |
other | object | No | None |
other.label | string | Yes | 1 to 40 characters. |
other.placeholder | string | No | Up to 80 characters. |
skip | object | No | None |
skip.label | string | Yes | 1 to 24 characters. |
submit_label | string | No | 1 to 24 characters. |
On the wire
{
"id": "blk_61",
"type": "choice",
"fallback_text": "Which items are you returning: Aero Glide 2, Court Low or the socks?",
"props": {
"question": "Which items are you returning?",
"hint": "Order #4821 · delivered 7 Oct",
"mode": "multi",
"style": "list",
"options": [
{ "id": "glide43", "label": "Aero Glide 2", "subtitle": "43 · Volt", "image_url": "https://…" },
{ "id": "court42", "label": "Court Low", "subtitle": "42 · Bone" },
{ "id": "socks", "label": "Running socks, 3 pairs" }
],
"submit_label": "Return"
}
}The pick reaches the model as Selected on blk_61: Aero Glide 2 (glide43), Court Low (court42).
Accessibility
A single pick is a radio group and a multi pick a group of checkboxes, both named by the question. How many are picked is announced as it changes.