0 Tk

Button Group

Button Group

The ButtonGroup component can be used to group related buttons.

Basic button group

The buttons can be grouped by wrapping them with the ButtonGroup component. They need to be immediate children.

{{ā€œdemoā€: ā€œBasicButtonGroup.jsā€}}

Button variants

All the standard button variants are supported.

{{ā€œdemoā€: ā€œVariantButtonGroup.jsā€}}

Sizes and colors

The size and color props can be used to control the appearance of the button group.

{{ā€œdemoā€: ā€œGroupSizesColors.jsā€}}

Vertical group

The button group can be displayed vertically using the orientation prop.

{{ā€œdemoā€: ā€œGroupOrientation.jsā€}}

Split button

ButtonGroup can also be used to create a split button. The dropdown can change the button action (as in this example) or be used to immediately trigger a related action.

{{ā€œdemoā€: ā€œSplitButton.jsā€}}

Disabled elevation

You can remove the elevation with the disableElevation prop.

{{ā€œdemoā€: ā€œDisableElevation.jsā€}}

Experimental APIs

Loading button

You can use the <LoadingButton /> from @mui/lab in the button group.

{{ā€œdemoā€: ā€œLoadingButtonGroup.jsā€}}