Tabs
Switch between related views in place.
Choose one of a few visible options in a joined track. role=radiogroup, sm or md, icons optional.
One choice in a joined track. Controlled or uncontrolled, sm or md, icons optional. role=radiogroup with arrow keys.
Click a segment or focus it and use the arrow keys. Variants shows sm, icons and a disabled item.
Pass value and onChange for a controlled group, or defaultValue for uncontrolled. Arrow keys move the checked segment. Disabled segments are skipped.
import { SegmentedControl } from "agentic-ds-kit";From contracts/segmentedcontrol.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.
| Name | Type | Required | Default | Notes |
|---|---|---|---|---|
| describedBy | string | No | — | Id(s) for aria-describedby on the radiogroup. Field passes its hint or error id. |
| ariaLabel | string | Yes | — | Names the radiogroup. There is no separate legend. |
| items | array | Yes | — | tooltip is an optional short hint in a kit Tooltip around that segment, shown on hover and on keyboard focus; the label stays the radio's name. Omit it and the segment renders as before. |
| value | string | No | — | controlled |
| defaultValue | string | No | — | uncontrolled |
| onChange | function | No | — | (value: string) => void |
| size | sm | md | No | md | — |
| fullWidth | boolean | No | false | Stretches the track to its container and splits it into equal segments, e.g. a filter above a list pane. |
| disabled | boolean | No | false | Locks the whole group. |