SegmentedButton
Use SegmentedButton to arrange related controls in a single pill-shaped row.
React
Group
Use Group for independent action buttons with no shared selection state. Items
default to ghost.
Group variant
Pass variant on the group to set the track background color. Items are
unaffected—they stay ghost unless each item sets its own variant.
Group item variant
Pass variant on individual items to style them differently. Items without a
variant stay ghost.
Mixed icon and label
Image button
Place a custom element directly inside Group to render a non-standard
control—for example a circular image button. Match the item height with
boxSize="400" and borderRadius="full" so it lines up with the other buttons.
Sizes
Group accepts size="medium" (default), "small", or "xs".
Color mode
Use colorMode="light" when placing the component on a dark surface.
Dividers
Use hasDivider to render a vertical separator after the first item, splitting
off the leading control from the rest of the group. This is useful when a
SegmentedButton sits inline with other toolbar elements.
Props
SegmentedButton.Group
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | SegmentedButton.Item elements | |
variant | 'primary' | 'secondary' | 'glass' | 'primary' | Sets the track background color; does not affect item styling |
size | 'medium' | 'small' | 'xs' | 'medium' | Size applied to every item in the group |
colorMode | 'light' | 'dark' | system | Force a color mode; defaults to the surrounding theme |
hasDivider | boolean | false | Render a divider after the first item (leading edge) |
hasShadow | boolean | false | Render the track with a drop shadow |
SegmentedButton.Item
| Prop | Type | Default | Description |
|---|---|---|---|
icon | IconType | Icon to render. When set, the item is icon-only and label is required for accessibility | |
label | string | Accessible label (required when icon is set) | |
children | ReactNode | Text content for a label item (use instead of icon) | |
variant | 'primary' | 'secondary' | 'glass' | 'ghost' | 'ghost' | Per-item button style; takes precedence over the group default |
onClick | () => void | Called when the item is pressed | |
isDisabled | boolean | false | Disables the item |