Bootstrap 5 Breakpoints: How to Build Truly Responsive Layouts
Responsive design isn’t optional anymore — it’s table stakes. But knowing how Bootstrap 5 handles responsiveness under the hood is what separates a layout that merely looks okay from one that feels intentional on every screen. This guide breaks down Bootstrap 5 breakpoints from first principles, shows you the utility classes that actually matter, and gives you copy-paste snippets you can drop into your next project right now.
- Bootstrap 5 ships with six named breakpoints:
xs,sm,md,lg,xl, andxxl. - All breakpoints are mobile-first — styles apply from the given width upward.
- Grid columns, display utilities, spacing, and typography all accept breakpoint infixes.
- You can customise breakpoint values in Sass without touching Bootstrap’s source files.
- Combining breakpoint-aware utilities eliminates the need for most custom media queries.
What Are Bootstrap 5 Breakpoints?
A breakpoint is a pixel threshold at which your layout is allowed to reflow. Bootstrap 5 defines six of them, each backed by a Sass variable and an auto-generated set of utility classes:
| Name | Infix | Min-width | Typical target |
|---|---|---|---|
| Extra small | (none) | 0px | Portrait phones |
| Small | sm |
576px | Landscape phones |
| Medium | md |
768px | Tablets |
| Large | lg |
992px | Laptops |
| Extra large | xl |
1200px | Desktops |
| Extra extra large | xxl |
1400px | Wide monitors |
The xs tier has no infix — it is the default, unprefixed class. So col-12 means “full-width on all screens”, while col-md-6 means “half-width from 768 px upward, full-width below”.
This mobile-first philosophy is the most important mental model to internalise. You write the small-screen rule first, then override it as the viewport grows.

Grid Columns at Every Breakpoint
The 12-column grid is Bootstrap’s backbone, and every column class accepts a breakpoint infix. Stack multiple infixes on one element to describe how a column behaves across the full range of devices:
<div class="container">
<div class="row g-4">
<!-- Full-width on phones, half on tablets, one-third on desktops -->
<div class="col-12 col-md-6 col-lg-4">
<div class="card p-3">Feature A</div>
</div>
<div class="col-12 col-md-6 col-lg-4">
<div class="card p-3">Feature B</div>
</div>
<!-- Sidebar: full-width on phones, full on tablet, one-third on desktop -->
<div class="col-12 col-lg-4">
<div class="card p-3">Sidebar</div>
</div>
</div>
</div>
Reading left to right: col-12 covers xs through sm. col-md-6 kicks in at 768 px and overrides the twelve-column rule. col-lg-4 takes over at 992 px. Bootstrap uses a cascade of min-width media queries, so each infix simply overrides the one before it at the appropriate threshold.
For masonry-style cards and feature grids, 8 Bootstrap 5 Card Components You Should Be Using Right Now pairs well with this technique — it shows how card variants interact with responsive column stacking.
Display and Visibility Utilities
Sometimes you don’t want to reflow content — you want to hide it entirely on certain screens. Bootstrap’s responsive display utilities make this clean:
<!-- Visible only on mobile (xs/sm) -->
<div class="d-block d-md-none">
<p>📱 Mobile nav placeholder</p>
</div>
<!-- Visible only on md and above -->
<div class="d-none d-md-block">
<nav class="navbar">Full desktop nav</nav>
</div>
<!-- Flex layout that becomes a column on small screens -->
<div class="d-flex flex-column flex-md-row gap-3">
<div class="p-3 bg-light">Column / Row item 1</div>
<div class="p-3 bg-light">Column / Row item 2</div>
<div class="p-3 bg-light">Column / Row item 3</div>
</div>
The pattern is always d-{breakpoint}-{value}. Values include none, block, inline, flex, grid, and more. Combining d-none with a breakpoint-specific d-{bp}-block lets you toggle entire sections without a single line of custom CSS.
The same breakpoint logic governs text alignment, spacing, and type scale. If you’re fine-tuning font sizes across screen sizes, the companion guide Bootstrap 5 Typography: Font Sizes, Weights, and Display Classes covers every responsive typography utility in detail.

Responsive Spacing and Sizing
Padding and margin utilities also accept breakpoint infixes, which is enormously useful for hero sections and call-to-action banners that need generous breathing room on desktop but compact padding on mobile:
<!-- Hero section: tight on mobile, spacious on desktop -->
<section class="py-5 py-lg-7 px-3 px-md-5 text-center bg-primary text-white">
<h1 class="display-4 display-md-2 fw-bold">Build Faster, Launch Smarter</h1>
<p class="lead mt-3 mb-4">Everything you need, none of what you don't.</p>
<a href="#" class="btn btn-light btn-lg">Get Started Free</a>
</section>
Note the py-5 py-lg-7 pattern: 3 rem of vertical padding on all screens, bumping to a larger custom value at the lg breakpoint. If you’re using the Canvas HTML template, utility spacing up to *-9 is available out of the box — pairing nicely with Bootstrap’s native scale.
Width and height sizing utilities (w-25, w-50, w-100, etc.) can also be scoped to breakpoints using the same infix pattern, giving you precise control over image and container sizing at every tier.
Customising Breakpoints with Sass
The default thresholds won’t fit every project. Bootstrap 5 is built on Sass, so you can override any breakpoint before the framework compiles. The key is to update the $grid-breakpoints and (if you use containers) $container-max-widths maps in your own stylesheet — never in Bootstrap’s source files:
<!-- In your custom _variables.scss (import BEFORE bootstrap) -->
/*
Override Bootstrap 5 breakpoints
Always import this file before @use 'bootstrap'
*/
$grid-breakpoints: (
xs: 0,
sm: 480px, // was 576px — better for modern phones
md: 768px,
lg: 1024px, // was 992px
xl: 1280px, // was 1200px
xxl: 1536px // was 1400px
);
$container-max-widths: (
sm: 460px,
md: 740px,
lg: 980px,
xl: 1240px,
xxl: 1496px
);
After recompiling, every breakpoint-aware utility class in Bootstrap — grids, displays, spacing, flex, order — automatically reflects your new values. You get the full utility API without duplicating a single media query.
If you’re shipping customised layouts to clients, documenting these overrides is essential. The 11 Things to Check Before Delivering an HTML Template to a Client checklist includes a prompt specifically for flagging Sass customisations so handoffs don’t turn into support tickets.
Practical Responsive Layout Patterns
Putting it all together, here are two production-ready patterns that combine breakpoints, grid, flex, and spacing utilities into real-world components:
Pattern 1 — Responsive pricing row (stacked on mobile, inline on desktop):
<div class="container py-5">
<div class="row row-cols-1 row-cols-md-3 g-4 justify-content-center">
<div class="col">
<div class="card h-100 text-center p-4 border-0 shadow-sm">
<h3 class="h5 fw-semibold">Starter</h3>
<p class="display-5 fw-bold my-3">$9</p>
<a href="#" class="btn btn-outline-primary">Choose Plan</a>
</div>
</div>
<div class="col">
<div class="card h-100 text-center p-4 border-primary shadow">
<span class="badge bg-primary mb-2">Most Popular</span>
<h3 class="h5 fw-semibold">Pro</h3>
<p class="display-5 fw-bold my-3">$29</p>
<a href="#" class="btn btn-primary">Choose Plan</a>
</div>
</div>
<div class="col">
<div class="card h-100 text-center p-4 border-0 shadow-sm">
<h3 class="h5 fw-semibold">Enterprise</h3>
<p class="display-5 fw-bold my-3">$79</p>
<a href="#" class="btn btn-outline-primary">Choose Plan</a>
</div>
</div>
</div>
</div>
row-cols-1 stacks all three cards on mobile. row-cols-md-3 switches to a three-column inline layout at the md breakpoint. Zero custom CSS required.
Pattern 2 — Sidebar layout (content-first on mobile, side-by-side on desktop):
<div class="container py-5">
<div class="row g-5">
<!-- Main content: 8/12 cols on lg, full-width below -->
<main class="col-12 col-lg-8 order-2 order-lg-1">
<h2>Article Title</h2>
<p>Your main content goes here...</p>
</main>
<!-- Sidebar: 4/12 cols on lg, full-width + reordered below -->
<aside class="col-12 col-lg-4 order-1 order-lg-2">
<div class="bg-light p-4 rounded">
<h5>Related Posts</h5>
<ul class="list-unstyled">
<li><a href="#">Link one</a></li>
<li><a href="#">Link two</a></li>
</ul>
</div>
</aside>
</div>
</div>
The order-* utilities reorder elements visually without touching the DOM — meaning the main article appears first in source order (better for SEO and screen readers) while the sidebar renders below it on mobile and beside it on desktop.
Frequently Asked Questions
What is the default breakpoint in Bootstrap 5?
The default (unprefixed) tier is xs, which starts at 0 px. Any class without a breakpoint infix — such as col-6 or d-flex — applies from the smallest possible screen size upward. This is the foundation of Bootstrap’s mobile-first approach.
Can I add a custom breakpoint to Bootstrap 5?
Yes. Add a new key-value pair to the $grid-breakpoints Sass map before importing Bootstrap, then recompile. Bootstrap will auto-generate all utility classes (grid columns, display, spacing, flex, etc.) for your new breakpoint. Just ensure the map stays in ascending order by pixel value.
What is the difference between col-md-6 and col-lg-6?
col-md-6 applies a 6-column (50%) width from 768 px and wider. col-lg-6 does the same but only from 992 px and wider. Below those thresholds, the element falls back to whichever smaller-breakpoint class is also applied — or to full-width (col-12) if none is specified.
Does Bootstrap 5 still use jQuery for its responsive components?
No. Bootstrap 5 dropped the jQuery dependency entirely. All interactive components — including the responsive navbar collapse — are powered by vanilla JavaScript bundled with Bootstrap. This reduces page weight and removes a legacy dependency.
How do I debug which breakpoint is active on my page?
A simple debugging trick is to add a fixed badge in the corner of your layout that shows the active tier. Add this snippet during development and remove it before going live:
<div class="position-fixed bottom-0 end-0 p-2 bg-dark text-white small z-3">
<span class="d-inline d-sm-none">XS</span>
<span class="d-none d-sm-inline d-md-none">SM</span>
<span class="d-none d-md-inline d-lg-none">MD</span>
<span class="d-none d-lg-inline d-xl-none">LG</span>
<span class="d-none d-xl-inline d-xxl-none">XL</span>
<span class="d-none d-xxl-inline">XXL</span>
</div>
If you’re working with the Canvas HTML Template and want to generate production-ready layouts faster, try Canvas Builder free and see how much time you save on every project.