SegmentedControl
Gen UI 2.0 standardA row of segments. The user chooses one option. Use it for 2 to 5 short options. Bind value with { "@path": "/x" } to read it.
One of the 69 components in CopilotKit's standardUI. The playground's catalog extends it, so every agent here can use SegmentedControl. Standard catalog docs
Props
Read from standardUI.manifestComponents in the installed @copilotkit/react-core. In A2UI 1.0 any value may also be a { "@path" } binding into the surface data model or a { "@call" } function call.
| Prop | Type | Required | Description |
|---|---|---|---|
| label | string | No | The visible label of the field. Always set it |
| options | (string | { value, label?, description? })[] | No | - |
| value | string | No | Bind it with { "@path": "/x" } to read what the user entered |
| checks | { condition?, message? }[] | No | Validation rules. The control shows the first failed one |
| block | boolean | No | Full width |
| variant | "solid" | "soft" | "outline" | "ghost" | No | Default "ghost" |
| disabled | boolean | No | - |
| size | "sm" | "md" | "lg" | "xl" | No | Default "lg" |
| pill | boolean | No | Default true |