You are currently viewing the auto-generated docs from the bs5-dev branch. The docs for the current release are available at https://react-bootstrap.github.io/
Button groups
Group a series of buttons together on a single line with the button group.
Feel free to mix input groups with button groups in your toolbars.
Similar to the example above, youโll likely need some utilities though
to space things properly.
@
@
<>
<ButtonToolbarclassName="mb-3"aria-label="Toolbar with Button groups">
Make a set of buttons appear vertically stacked rather than
horizontally, by adding vertical to the <ButtonGroup>.
Split button dropdowns are not supported here.
import ButtonGroup from 'react-bootstrap/ButtonGroup'Copy import code for the ButtonGroup component
Name
Type
Default
Description
as
elementType
<div>
You can use a custom element type for this component.
role
string
'group'
An ARIA role describing the button group. Usually the default
"group" role is fine. An aria-label or aria-labelledby
prop is also recommended.
size
'sm' | 'lg'
Sets the size for all Buttons in the group.
vertical
boolean
false
Make the set of Buttons appear vertically stacked.
bsPrefix
string
'btn-group'
Change the underlying component CSS base class name and modifier class names prefix. This is an escape hatch for working with heavily customized bootstrap css.
import ButtonToolbar from 'react-bootstrap/ButtonToolbar'Copy import code for the ButtonToolbar component
Name
Type
Default
Description
role
string
'toolbar'
The ARIA role describing the button toolbar. Generally the default
"toolbar" role is correct. An aria-label or aria-labelledby
prop is also recommended.
bsPrefix
string
'btn-toolbar'
Change the underlying component CSS base class name and modifier class names prefix. This is an escape hatch for working with heavily customized bootstrap css.