| asChild | boolean | false | headless | When true, Root delegates rendering to a single consumer-supplied
element via the Slot pattern instead of the default <div>;
role="radiogroup", aria-orientation, data-orientation,
data-disabled, dir, and remaining props are merged onto it. |
| children | ReactNode | — | headless | The control's segments — SegmentedControlItemProps`SegmentedControl.Item`
elements. |
| defaultValue | string | — | headless | Value of the segment selected on first render. Omit for nothing
selected on mount.
Forbidden in controlled mode — use value instead. |
| dir | "ltr" | "rtl" | — | headless | Reading direction. In "rtl" the horizontal arrow pair is swapped so
Arrow Left moves forward. When omitted, it is inherited from the
nearest DirectionProvider, falling back to "ltr". |
| disabled | boolean | false | headless | Disables the entire control — every segment is non-interactive and
excluded from arrow-key navigation, and data-disabled="" is set on
the root. Individual segments can also be disabled via the Item's own
disabled prop. |
| onValueChange | (value: string) => void | — | headless | Called with the new value whenever the selection changes. Optional
in uncontrolled mode.
Called with the new value whenever the selection changes. Required
in controlled mode. |
| orientation | "horizontal" | "vertical" | "horizontal" | headless | Which arrow-key pair moves focus and selection through the segments,
and the visual axis. "horizontal" binds Arrow Left/Right;
"vertical" binds Arrow Up/Down. Reflected as aria-orientation and
data-orientation on the root. |
| ref | Ref<HTMLDivElement> | — | headless | Allows getting a ref to the component instance.
Once the component unmounts, React will set ref.current to null
(or call the ref with null if you passed a callback ref).
Forwarded to the underlying HTMLDivElement. |
| value | string | — | headless | Forbidden in uncontrolled mode — use defaultValue instead.
The currently selected value. Must be kept in sync by the parent
via onValueChange. |
| size | "xs" | "sm" | "md" | "lg" | "xl" | md | styled | Control size for the whole control; data-density scales each size further. |
| justify | "content" | "justified" | justified | styled | Whether segments share the track width equally or size to their content. |