Examples
Bootstrap includes six predefined button styles, each serving its own semantic purpose.
Outline buttons
In need of a button, but not the hefty background colors they
bring? Replace the default modifier classes with the .btn-outline-*
ones to remove all background
images and colors on any button.
Button tags
The .btn
classes are
designed to be used with the <button>
element. However, you can also use these classes on <a>
or <input>
elements (though some browsers
may apply a slightly different rendering).
Sizes
Fancy larger or smaller buttons? Add
.btn-lg
or .btn-sm
for additional sizes.
Block Buttons
Create block level buttons by adding class .d-grid
to parent div.
Toggle states
Add data-toggle="button"
to toggle a button’s active
state. If you’re pre-toggling a button,
you must manually add the .active
class
and aria-pressed="true"
to
the
<button>
.
Checkbox buttons
Bootstrap’s .button
styles can be applied to other elements, such as
<label>
s, to provide checkbox or radio style button toggling. Add
data-toggle="buttons"
to a
.btn-group
containing those modified buttons
to enable toggling in their respective styles.
Radio buttons
Bootstrap’s .button
styles can be applied to other elements, such as
<label>
s, to provide checkbox or radio style button
toggling. Add data-toggle="buttons"
to a
.btn-group
containing those modified buttons
to enable toggling in their respective styles.
Button group
Wrap a series of buttons with .btn
in .btn-group
.
Button toolbar
Combine sets of button groups into button toolbars for more complex components. Use utility classes as needed to space out groups, buttons, and more.
Sizing
Instead of applying button sizing classes to every button in
a group, just add .btn-group-*
to each .btn-group
, including each one when nesting
multiple groups.
Vertical variation
Make a set of buttons appear vertically stacked rather than horizontally. Split button dropdowns are not supported here.