Through this Bootstrap cheat sheet, you will get a complete list of topics that will guide you while working with the popular CSS framework. The Bootstrap cheat sheet will also help you prepare for a front-end development interview.
Before proceeding further, let us know some important things about Bootstrap:
- It is an open-source framework of CSS .
- Bootstrap is used to create mobile-friendly front-end pages.
- It contains CSS, jQuery, and JavaScript.
- Bootstrap also contains JavaScript plugins.
- The newest version of Bootstrap is Bootstrap 4.
- It has the 3 rd highest starred open project on GitHub.
- It provides prebuild tools that we can insert into HTML web pages.
- Bootstrap uses a cache system in which we do not have to install it on our system. It requires internet only one time and after that, it makes a cache of its file and store in a web browser.
Adding Bootstrap in Your HTML File (Bootstrap Cheat Sheet)
Bootstrap Components
In this Bootstrap cheat sheet, we are going to cover the following Bootstrap components:
- Alert
- Badges
- Breadcrumbs
- Buttons
- Buttons Group
- Card
- Carousel
- Collapse
- Dropdowns
- Forms
- Navbar
- Paginators
- Table
Alerts
Alerts provide feedback messages, and they are often used after the user has performed some action on the web pages.
Alert Type | Code |
alert-success | |
alert-info | |
alert-warning | |
alert-danger | |
alert-link | |
alert-dismissible | |
alert-heading |
Badges
These are used to count the total elements and label them.
Badges Type | Code |
badge-default | |
badge-pill | |
badge-primary | |
badge-success | |
badge-info | |
badge-warning | |
badge-danger | |
Links with badges |
Breadcrumbs
Breadcrumbs provide a mini-navigation, and it is used to tell us on which folder we are right now.
Breadcrumb | Code |
breadcrumbs |
Buttons
We often use buttons on our webpage because they provide an attractive look to the links. With Bootstrap, we can style button tags.
Button Type | Code |
btn-primary | |
btn-secondary | |
btn-success | |
btn-info | |
btn-warning | |
btn-danger | |
btn-link | |
btn-outline-primary | |
btn-outline-secondary | |
btn-outline-success | |
btn-outline-info | |
btn-outline-warning | |
btn-outline-danger |
Button Groups
In Button Groups we can align 2 or more than 2 buttons together.
Button Group Type | Code |
btn-group | |
btn-group-lg | |
btn-group-sm | |
btn-group-vertical | |
btn-group (nested) | |
btn-toolbar |
Buttons Modifiers
In Bootstrap, we have buttons modifiers when you want to modify your buttons. Buttons modifiers can manipulate the size of buttons and can disable or enable the same.
Button Modifier | Description |
btn-lg | Increases the size of the buttons. |
btn-small | Decreases the size of the buttons. |
btn-block | A block button. |
active button | It provides an active link to the button. |
disable button | It disables a button. |
Cards
In Bootstrap we have cards that are simple containers. These can hold images and descriptions. There are various functionalities associated with a card as shown below.
Card types | Code |
card | |
card-group | |
card-columns | |
card-block | |
card-titl | |
card-subtitle | |
card-text | |
card-link | |
card-img-top | |
card-img-bottom | |
card-img-overlay | |
middle-image | |
list-group | |
card-header | |
card-inverse | |
card-primary | |
card-info | |
card-success | |
card-warning | |
card-danger |
Carousel
It provides buttons that help to scroll images, cards or containers.
Types of Carousel | Code |
Carousel-slide | |
Carousel-indicators | |
Carousel-caption |
Collapse
It is a JavaScript plugin, and it toggles the visibility of the content. When you click on it, the content of that button appears.
Collapse Types | Code |
collapse | |
accordion |
Dropdowns
These are used to show a list of links as options, and they can toggle the content. It provides an interactive form of a list. Often, we create a dropdown as a button so when we click on it, give a slide of other links.
Dropdown Types | Code |
dropdown | |
dropdown (split) | |
dropup | |
dropup (split) | |
dropright | |
dropleft | |
dropdown-header | |
dropdown-item-text | |
dropdown-divider | |
dropdown-item-disable | |
dropdown-menu-right |
Forms
Forms are the common tool of HTML. With Bootstrap, we can style the forms. We use a form to collect data from the user. Next, we can perform appropriate operations on that data.
Form Types | Code |
form-group | |
form-inline | |
form using grid | |
form-control | |
form-control-lg | |
form-control-sm | |
form-control-file | |
form-control-plaintext | |
form-control-range | |
form-check | |
form-check-inline | |
readonly |
Jumbotron
It is a type of container, which shows the hero unit style content.
Jumbotron | Code |
jumbotron | |
jumbotron-fluid |
Navbar
Navbar provides interactive navigation header to the website. With Navbar, we can easily visit any page.
Navbar Types | Code |
navbar | |
navbar-brand | |
navbar with form | |
navbar-text | |
navbar-dark bg-dark | |
navbar-light | |
navbar fixed-top | |
navbar fixed-bottom | |
navbar sticky-top | |
collapse navbar-collapse | |
navbar-toggler | |
navbar-expand-* |
Pagination
Pagination helps to display the different page numbers of a website. With paginators, we can jump to any page of the website.
Paginator Types | Code |
pagination | |
page-item disable | |
page-item active | |
pagination-lg | |
pagination-sm |
Tables
Tables represent a set of relational data. With Bootstrap, we can create a set of interactive tables.
Table Types | Code |
Table | |
Thead-light | |
Thead-dark | |
Table-striped | |
Table-bordered | |
Table-borderless | |
Table-hover | |
Table-sm | |
Table-*-responsive | |
Table-dark |
That's All!
The Bootstrap cheat sheet contains all the help you need while learning HTML and front-end development. Moreover, it can serve as your reference while developing a project using the Popular HTML framework .
Something wrong with the Bootstrap cheat sheet? Let us know via the comments so that we can mend it ASAP.
Thanks already!
People are also reading:
Leave a Comment on this Post