Component size, gzipped: 21kb

Button Group


Groups a collection of similar actions together.

When to use

  • If you need to emphasize context of similar actions.
  • If a single option or multiple options of the set may be selected.


Basic usage

With icons

With enhancers

Radio mode

In radio mode, the button group functions similarly to a radio group. Only one button can be "selected" at a time.

Checkbox mode

In checkbox mode, the button group functions similarly to a group of checkboxes. Multiple buttons can be "selected" at the same time.

Disabled button group

You can disable the entire button group as in the example above. Or you can disable isolated buttons as in the example below.

Single disabled button

With a dropdown

Stateful (uncontrolled) with radio mode

As with many of our components, there is also an uncontrolled version, StatefulButtonGroup, which manages its own state. If mode is set to radio or checkbox, this stateful version of the component will adapt to keep track of the selected value(s).

Stateful (uncontrolled) with checkbox mode


ButtonGroup props

Buttons within the group
Indicates that the button group is disabled
Changes keyboard shortcuts and role attributes. The actual onClick update implementation is up to you.
Function called when any button is clicked.
Lets you customize all aspects of the component.
Defines which buttons are selected
Defines the shape of the button in the button group.
Defines the size of the button.

ButtonGroup exports

You can import this module like so:

import {ButtonGroup} from 'baseui/button-group'

It exports the following components or utility functions: