The ButtonGroup component can be used to group related buttons.
The buttons can be grouped by wrapping them with the ButtonGroup
component.
They need to be immediate children.
{{ādemoā: āBasicButtonGroup.jsā}}
All the standard button variants are supported.
{{ādemoā: āVariantButtonGroup.jsā}}
The size
and color
props can be used to control the appearance of the button group.
{{ādemoā: āGroupSizesColors.jsā}}
The button group can be displayed vertically using the orientation
prop.
{{ādemoā: āGroupOrientation.jsā}}
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ā}}
You can remove the elevation with the disableElevation
prop.
{{ādemoā: āDisableElevation.jsā}}
You can use the <LoadingButton />
from @mui/lab
in the button group.
{{ādemoā: āLoadingButtonGroup.jsā}}