Button Groups
Use button groups to keep related actions together. The examples below show the existing markup for a single group, multiple groups in a toolbar, and vertically stacked buttons.
Single button group
Wrap related buttons with the .btn class inside a .btn-group container.
<div class="btn-group">
<button class="btn">Left</button>
<button class="btn">Middle</button>
<button class="btn">Right</button>
</div>
Multiple button groups
For more complex controls, place separate .btn-group elements inside a .btn-toolbar.
<div class="btn-toolbar">
<div class="btn-group">
...
</div>
</div>
Vertical button groups
Add .btn-group-vertical to stack related buttons vertically instead of horizontally.
<div class="btn-group btn-group-vertical">
...
</div>
Button group behavior and dropdowns
Checkbox and radio behavior
Button groups can be used as radio controls, where one button can be active, or as checkbox controls, where more than one button can be active. See the JavaScript button documentation for the related behavior.
Dropdown buttons
When using dropdowns in a button toolbar, wrap each dropdown button in its own .btn-group within the .btn-toolbar so it renders correctly.