Bootstrap includes six predefined button styles, each serving its own semantic purpose.
Fancy larger or smaller buttons? Add .btn-lg
or .btn-sm
for additional sizes.
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.
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).
Make buttons look inactive by adding the disabled boolean attribute to any <button>
element.
Disabled buttons using the <a>
element behave a bit different:
Create block level buttons—those that span the full width of a parent—by adding .btn-block
.
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 andaria-pressed="true"
to the <button>
.
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.
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.
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..
Place a .btn-group
within another .btn-group
when you want dropdown menus mixed with a series of buttons.Make a set of buttons appear vertically stacked rather than horizontally.
A button variant for using icon with label.
A button variant for using only icons.