Buttons
There are rich classes for handling the look and feel of buttons.
Buttons
btn
basic class- Apply to:
button
,a
orinput
role="button"
ona
type="button"
input
orbutton
The basic button class is the btn class. It can be applied to either buttons, anchor tags or input fields.
If you're using a button on an anchor tag, you should add the role="button" property for assistive devices.
If you're using a button or input, you should add the type=button property.
Contextual Buttons
btn{-outline}{-TYP}
- BR:
primary
secondary
success
danger
warning
info
light
dark
link
- BR:
In addition to the btn class, you add one contextual color class to your buttons.
There is a special btn-link class that makes the button look like a regular link, but still takes up the space of a button.
There is also an outline version of the buttons you can use by adding the outline keyword
Sizes
btn-sm
btn-lg
There are three sizes for buttons. A small, a large size and then the regular size of the buttons.
Button Groups
btn-group
btn-group-vertical
btn-group-sm
btn-group-lg
btn-check
Button groups give you a way to put buttons together. The basic class is a container that goes around the buttons you want to group. You can either choose a regular or a vertical version of this class.
There is a different style if you add the active class that works really well for outlines.
There are some different variations you can use like the two sizing classes. These go on the same container that have the btn-group
class.
There is also a class for making the buttons stack on top of one another called btn-group-vertical
There's another real interesting class called btn-check
that will really help to make checkboxes or radio input fields look like buttons, but behave in their normal manner as long as they're coded properly.