A button group is a combination of multiple buttons related to each other.
The size determines the spacing between the buttons.
The default small size has a gap of 8px
and should be used for sister buttons (save/cancel, next/back, undo/redo).
The large size has a gap of 16px
and should be used for neighbor buttons (a row of buttons in the top right of the page).
Use left alignment in forms or other page content. This should be a default choice in most cases. Primary button is positioned first and secondary buttons are last.
Use center alignment in empty or error states. Primary button is positioned first and secondary buttons are last. Try to use no more than two buttons when button group is aligned to center.
Use right alignment in dialogs, wizards and toolbars. Secondary buttons are positioned first and primary buttons are last.
Inherits margin props.
Name | Default | Description |
---|---|---|
size | "sm" | "sm" | "lg" The size determines the spacing between the buttons. |
children | — | ReactNode Buttons. |