API and Development
ButtonGroup is a flex container (role="group") that visually merges adjacent Button elements on the shared grouped-control tray (inset-subtle fill, alt2 border — same chrome as SegmentedControl / ToggleGroup). ButtonGroupSeparator inserts space between nested groups; ButtonGroupText adds a labeled static segment on that tray. Orientation is ButtonGroupOrientation.Horizontal (default) or Vertical.
Name | Type | Default | Description |
|---|---|---|---|
|
| — | Controls cross-axis alignment of flex children. Maps to CSS |
|
| — | Removes bottom border-radius, making the box flush against the bottom edge. |
|
| — | Removes left border-radius, making the box flush against the left edge. |
|
| — | Removes right border-radius, making the box flush against the right edge. |
|
| — | Removes top border-radius, making the box flush against the top edge. |
|
| — | Applies a semantic background color token to the box. |
|
| — | Sets the initial main size of the flex item. Maps to CSS |
|
| — | Applies a border style to all sides of the box. |
|
| — | Applies a border style to only the bottom side. |
|
| — | Applies a border style to only the left side. |
|
| — | Sets the border radius using a design token. |
|
| — | Applies a border style to only the right side. |
|
| — | Applies a border style to only the top side. |
|
| — | Additional CSS class name(s) to apply to the box element. |
|
| — | Enables CSS container queries by setting the |
|
| — | — |
|
| — | Applies a box-shadow elevation level for depth/layering. |
|
| — | Controls whether flex items wrap onto multiple lines. Maps to CSS |
|
| — | Spacing between child elements. Maps to CSS |
|
| — | When true, sets |
|
| — | Controls main-axis alignment of flex children. Maps to CSS |
|
| — | Outer spacing around the box. Accepts a spacing token. |
|
| — | Click handler forwarded to the underlying element (along with other DOM props in |
|
| — | Keydown handler forwarded to the underlying element. Useful for div-based controls that need to respond to Enter/Space like a button. |
|
| — | Pointer down handler forwarded to the underlying element. |
|
|
| The orientation of the button group |
|
| — | Controls overflow behavior for content that exceeds the box dimensions. |
|
| — | Inner spacing within the box. Accepts a spacing token. |
|
| — | Sets the CSS |
|
| — | Optional ref for the container element |
|
| — | When true, sets |
|
| — | Inline styles applied directly to the box element. |
|
| — | Controls the CSS |
|
| — | Sets the CSS |
Interactive examples and edge cases for this component are in Storybook.
Name | Type | Default | Description |
|---|---|---|---|
|
|
| Gap between sub-groups. |
|
|
| Non-action label segment. |