Button Group

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.

#

#

  • When there are at least two buttons positioned near each other.

#

  • When there's only one button in a group.

#

  • Only buttons are acceptable as children to this component.

#

Inherits margin props.

NameDefaultDescription
size"sm""sm" | "lg"

The size determines the spacing between the buttons.

children

ReactNode

Buttons.

On this page

  • Example
  • Size
  • Small
  • Large
  • Usage
  • Left alignment
  • Center alignment
  • Right alignment
  • Guidelines
  • When to use
  • When not to use
  • Content
  • Props