Bootstrap relies entirely on native CSS Media Queries to construct its responsive layouts. A Breakpoint is simply a specific screen width (measured in pixels) where the webpage layout visually "breaks" and reconstructs itself to fit the user's device better.
Bootstrap 5 utilizes six default grid tiers. You will inject these specific abbreviations (like md or lg) directly into utility classes to trigger visual changes selectively!
| Breakpoint Name | Class Abbreviation | Screen Width Threshold |
|---|---|---|
| Extra small (Mobile) | None | <576px |
| Small (Large phone) | sm |
≥576px |
| Medium (Tablet) | md |
≥768px |
| Large (Laptop) | lg |
≥992px |
| Extra large (Desktop) | xl |
≥1200px |
| Extra extra large | xxl |
≥1400px |
Bootstrap natively functions structurally as a Mobile-First framework. What does that mean? It means any generic class you write applies directly to the smallest cellphone screens exclusively by default, and seamlessly scales upwards to everything larger!
For example, if you apply the class .d-md-none, you aren't just hiding the element on medium tablets. Because breakpoints strictly scale *upwards*, the element will functionally vanish on Tablets, Laptops, Desktops, and 4k monitor screens equally! It will only securely remain visible entirely on cellphones (where the rule hasn't triggered yet).
Golden Rule: Always design your core structure securely assuming the user is holding a tiny phone, and then gracefully apply sm, md, or lg breakpoint modifiers to strictly scale the design upwards efficiently for large monitors!
Visually resize your browser window right now! On a tiny mobile screen, this layout defaults to a vertical column grid. But as you drag the window wider, the md breakpoint automatically triggers, and the column seamlessly snaps into a side-by-side flex row!
<!-- Code defaults fully to a Stacked Column (Mobile). Once the screen hits "MD", it magically spins physically into a specifically horizontal flexibly dynamically elegantly cleanly functionally row automatically! -->
<div class="d-flex flex-column flex-md-row">
<div>Box 1</div>
<div>Box 2</div>
</div>