Segmented
Composite Inputs and selection draft Gen UI part Needs actionPick one of 2 to 4 short options that change the view or a setting.
Examples
HTML and CSS
Framework-free reference. Styles live in system/components/segmented-tabs.css and read only tokens. Wrap markup in .v-root.
Rendered markup of the anatomy example
Props and slots
The component API. Gen UI JSON uses these names, and the Flutter widget should mirror them.
Props
| Prop | Values | Default |
|---|---|---|
options * | array. Labels, 2 to 4 | |
selected | number | 0 |
variant | default | strong | default |
action * | string. Action name, e.g. "plan.open" or "pay.share". The part before the dot is the action type. | |
payload | object |
* required.
Slot rules
No slots. This part takes no children.
In Gen UI
How VelioBot uses this part. The bot returns JSON; the validator checks it; the renderer draws it.
JSON node
Every node may also carry id, grow, attribution, privateOnly and fallbackText. Interactive: the node must carry an action, and taps emit { action, payload }.
Rules that name this part
segmented-count Segmented control: 2 to 4 options.
Usage in recipes
2 of the original cards use it. After V1. Priority table
Bot functions: Bill split and payments, Group plans, Meet new people, Occasions and events.