Usage
ButtonGroup visually merges related actions into a single cluster. It signals that the actions share context and emphasis—most often in dispatch toolbars, drawer footers, and form action rows where spacing and alignment need to read as one unit. Use it when operators should scan the actions as a set; reach for separate buttons or a SplitButton when hierarchy varies across the cluster. Leaf groups use the same inset tray, alt2 border, radius, and shared dividers as SegmentedControl and ToggleGroup. Dividers remain visible between adjacent secondary actions and between ButtonGroupText and a neighboring secondary action in either orientation. The tray preserves the same total height as its members: 2.4rem for small, 2.8rem for regular, and 3.2rem for large controls.
Only leaf groups paint that tray (pr-button-group--leaf). A parent used as a layout cluster—nested ButtonGroup as a direct child, or under a shallow non-button wrapper (for example FlexBox)—drops its chrome (pr-button-group--layout) so outlines never stack. React emits exactly one of those modifiers; CSS does not re-derive the split.
Secondary or all SecondaryAlt.ButtonGroupSeparator (edit cluster + share cluster).Button with Primary or Critical stand on its own; grouping dilutes the primary's emphasis.SplitButton.Menu trigger.formatMessage for every string.Primary and Secondary in one group is almost always wrong.ButtonGroupSeparator when the group splits into sub-clusters so the border treatment communicates the grouping.