---
title: "The Ultimate Bootstrap 5 Cheatsheet: Developer's Quick Reference Guide"
slug: "/guide/bootstrap-cheatsheet/"
date: "2025-03-18"
description: "Boost your web development workflow with this Bootstrap 5 cheatsheet. Features all components, layout options, and responsive utilities with clean, working code examples."
categories: ["Guide"]
author: "Azad Shaikh"
featured_image: "https://asterodigital.com/storage/01m4fekjpdqy180z63shzc7g80/cheatsheet-optimized.webp"
---

# The Ultimate Bootstrap 5 Cheatsheet: Developer's Quick Reference Guide

## Primary Navigation

- [Home](/home.md)
- [About](/about.md)
- [Services](/services.md)
- Products
    - [Astero Admin](/astero-admin.md)
- [Blog](/blog)
- [Contact Us](/contact-us.md)

## Bootstrap 5 Components Cheatsheet

A comprehensive guide to Bootstrap's most useful components





## Table of Contents



- <a class="nav-link pgb-editor-link">Layout Components</a>
- <a class="nav-link pgb-editor-link">Content Components</a>
- <a class="nav-link pgb-editor-link">Form Components</a>
- <a class="nav-link pgb-editor-link">Navigation Components</a>
- <a class="nav-link pgb-editor-link">Feedback Components</a>









## Layout Components

### Grid System

Bootstrap's grid system uses containers, rows, and columns to layout and align content. It's built with flexbox and is fully responsive.

Column 1

Column 2

Column 3





```
<div class='container'>
  <div class='row'>
    <div class='col-sm-4'>Column 1</div>
    <div class='col-sm-4'>Column 2</div>
    <div class='col-sm-4'>Column 3</div>
  </div>
</div>
```





### Containers

Containers are the most basic layout element in Bootstrap and are required when using the grid system.

```
<div class='container'>
  <!-- Content here -->
</div>

<div class='container-fluid'>
  <!-- Full-width content here -->
</div>

<div class='container-lg'>
  <!-- Responsive container -->
</div>
```





### Breakpoints

Bootstrap includes six default breakpoints for responsive design:

BreakpointClass InfixDimensionsExtra small(none)&lt;576pxSmallsm≥576pxMediummd≥768pxLargelg≥992pxExtra largexl≥1200pxExtra extra largexxl≥1400px





## Content Components

### Typography

Bootstrap defines basic styling for headings, paragraphs, lists, and more.

# h1. Bootstrap heading

## h2. Bootstrap heading

### h3. Bootstrap heading

This is a lead paragraph. It stands out from regular paragraphs.



```
<h1>h1. Bootstrap heading</h1>
<h2>h2. Bootstrap heading</h2>
<h3>h3. Bootstrap heading</h3>
<p class='lead'>This is a lead paragraph.</p>
```





### Cards

Cards provide a flexible container for displaying content.

##### Card title

###### Card subtitle

Some quick example text to build on the card title and make up the bulk of the card's content.

<a class="card-link pgb-editor-link">Card link</a> <a class="card-link pgb-editor-link">Another link</a>





```
<div class='card' style='width: 18rem;'>
  <div class='card-body'>
    <h5 class='card-title'>Card title</h5>
    <h6 class='card-subtitle mb-2 text-muted'>Card subtitle</h6>
    <p class='card-text'>Some quick example text.</p>
    <a href='#' class='card-link'>Card link</a>
    <a href='#' class='card-link'>Another link</a>
  </div>
</div>
```





### Tables

Responsive tables with various styling options.

\#FirstLastHandle1MarkOtto@mdo2JacobThornton@fat3Larrythe Bird@twitter

```
<table class='table table-striped'>
  <thead>
    <tr>
      <th scope='col'>#</th>
      <th scope='col'>First</th>
      <th scope='col'>Last</th>
      <th scope='col'>Handle</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th scope='row'>1</th>
      <td>Mark</td>
      <td>Otto</td>
      <td>@mdo</td>
    </tr>
    <!-- More rows -->
  </tbody>
</table>
```









## Form Components

### Form Controls

Basic form controls with custom styling.

Email address We'll never share your email with anyone else.



Password 

Submit

```
<form>
  <div class='mb-3'>
    <label for='exampleInputEmail1' class='form-label'>Email address</label>
    <input type='email' class='form-control' id='exampleInputEmail1' aria-describedby='emailHelp'>
    <div id='emailHelp' class='form-text'>We'll never share your email with anyone else.</div>
  </div>
  <div class='mb-3'>
    <label for='exampleInputPassword1' class='form-label'>Password</label>
    <input type='password' class='form-control' id='exampleInputPassword1'>
  </div>
  <button type='submit' class='btn btn-primary'>Submit</button>
</form>
```





### Select Menus

Custom select menus with various options.

Open this select menuOneTwoThree

```
<select class='form-select' aria-label='Default select example'>
  <option selected>Open this select menu</option>
  <option value='1'>One</option>
  <option value='2'>Two</option>
  <option value='3'>Three</option>
</select>
```





### Checks and Radios

Custom checkboxes and radio buttons.

  Default checkbox 

  Default radio 



```
<div class='form-check'>
  <input class='form-check-input' type='checkbox' value='' id='flexCheckDefault'>
  <label class='form-check-label' for='flexCheckDefault'>
    Default checkbox
  </label>
</div>

<div class='form-check'>
  <input class='form-check-input' type='radio' name='flexRadioDefault' id='flexRadioDefault1'>
  <label class='form-check-label' for='flexRadioDefault1'>
    Default radio
  </label>
</div>
```









## Navigation Components

### Navbar

Responsive navigation header with support for branding, navigation, and more.

<a class="navbar-brand pgb-editor-link">Navbar</a>  - <a aria-current="page" class="nav-link active pgb-editor-link">Home</a>
- <a class="nav-link pgb-editor-link">Features</a>
- <a class="nav-link pgb-editor-link">Pricing</a>







```
<nav class='navbar navbar-expand-lg navbar-light bg-light'>
  <div class='container-fluid'>
    <a class='navbar-brand' href='#'>Navbar</a>
    <button class='navbar-toggler' type='button' data-bs-toggle='collapse' data-bs-target='#navbarNav' aria-controls='navbarNav' aria-expanded='false' aria-label='Toggle navigation'>
      <span class='navbar-toggler-icon'></span>
    </button>
    <div class='collapse navbar-collapse' id='navbarNav'>
      <ul class='navbar-nav'>
        <li class='nav-item'>
          <a class='nav-link active' aria-current='page' href='#'>Home</a>
        </li>
        <li class='nav-item'>
          <a class='nav-link' href='#'>Features</a>
        </li>
        <li class='nav-item'>
          <a class='nav-link' href='#'>Pricing</a>
        </li>
      </ul>
    </div>
  </div>
</nav>
```





### Pagination

Simple pagination links for navigation.

- <a class="page-link pgb-editor-link">Previous</a>
- <a class="page-link pgb-editor-link">1</a>
- <a class="page-link pgb-editor-link">2</a>
- <a class="page-link pgb-editor-link">3</a>
- <a class="page-link pgb-editor-link">Next</a>



```
<nav aria-label='Page navigation example'>
  <ul class='pagination'>
    <li class='page-item'><a class='page-link' href='#'>Previous</a></li>
    <li class='page-item'><a class='page-link' href='#'>1</a></li>
    <li class='page-item'><a class='page-link' href='#'>2</a></li>
    <li class='page-item'><a class='page-link' href='#'>3</a></li>
    <li class='page-item'><a class='page-link' href='#'>Next</a></li>
  </ul>
</nav>
```





### Breadcrumbs

Indicate the current page's location within a navigational hierarchy.

1. <a class="pgb-editor-link">Home</a>
2. <a class="pgb-editor-link">Library</a>
3. Data



```
<nav aria-label='breadcrumb'>
  <ol class='breadcrumb'>
    <li class='breadcrumb-item'><a href='#'>Home</a></li>
    <li class='breadcrumb-item'><a href='#'>Library</a></li>
    <li class='breadcrumb-item active' aria-current='page'>Data</li>
  </ol>
</nav>
```









## Feedback Components

### Alerts

Provide contextual feedback messages.

A simple primary alert—check it out!

A simple success alert—check it out!

A simple danger alert—check it out!



```
<div class='alert alert-primary' role='alert'>
  A simple primary alert—check it out!
</div>
<div class='alert alert-success' role='alert'>
  A simple success alert—check it out!
</div>
<div class='alert alert-danger' role='alert'>
  A simple danger alert—check it out!
</div>
```





### Buttons

Bootstrap includes several predefined button styles.

Primary Secondary Success Danger Warning Info

```
<button type='button' class='btn btn-primary'>Primary</button>
<button type='button' class='btn btn-secondary'>Secondary</button>
<button type='button' class='btn btn-success'>Success</button>
<button type='button' class='btn btn-danger'>Danger</button>
<button type='button' class='btn btn-warning'>Warning</button>
<button type='button' class='btn btn-info'>Info</button>
```

## Secondary Navigation

- [About](/about.md)
- [Our Blog](/blog)
- [Services](/services.md)
- [Hire Us](/hire-us.md)

Powered by [Astero](https://astero.in)
Copyright 2026 Astero Digital
