Bootstrap has several classes that can be used to style HTML button elements.
The basic Bootstrap button is very plain - rounded corners, white background, and thin grey borders. You add the Bootstrap classes .btn
and .btn-default
to create a default button.
You can add the button classes on three HTML tags:
As with other Bootstrap elements, there are secondary button classes that change the color and size of the buttons:
btn-default
— The standard buttonbtn-primary
— The primary action in a set of buttonsbtn-success
— Indicates a successful or positive actionbtn-info
— Contextual button for informational alert buttonsbtn-warning
— Indicates that caution should be taken with this actionbtn-danger
— Indicates a dangerous or negative actionbtn-link
— Makes the button look like a link while still behaving like a buttonThere are four button sizes in Bootstrap. Medium is the default, but there are three classes to create a large, small, or extra-small button:
Buttons can be set to appear active or disabled. They did not give the code for this, but it should look something like this: