Foresite Design Editorial Team · January 2026
Bootstrap 5 Dashboard Layout - Building the Foundation (Part 1)
Dashboards are fundamentally different from marketing websites. They prioritise clarity, structure, responsiveness, and scalability over visual flair. In this tutorial, we focus exclusively on creating a robust layout foundation using Bootstrap 5 that will support a complete dashboard by the end of this series.
This is Part 1 of a 4-part Bootstrap 5 dashboard tutorial, where each article builds on the last and results in a fully functional, production-ready dashboard template.
Prerequisites
- Basic HTML and CSS knowledge
- Understanding of responsive layouts
- No JavaScript or jQuery required
- Bootstrap 5 only (latest version)
Don’t Copy-Paste — Learn by Writing
Typing the code yourself instead of copying and pasting helps you understand what the code is actually doing.
When you write each line, you're more likely to notice how elements fit together, what different classes are responsible for, and why certain attributes are needed.
This makes the layout and behaviour easier to follow, rather than feeling like a “black box” that just works.
It also makes fixing problems much easier. If something breaks, you'll have a better idea of where to look because you built it step by step.
Over time, this builds confidence, helps the code stick in your memory, and makes it easier to reuse what you've learned in your own projects.
Why Dashboard Layout Matters
Before adding cards, charts, or tables, a dashboard needs a predictable and scalable structure. Poor layout decisions early on lead to:
- Broken mobile experiences
- Over-nested grids
- Rigid sidebars that do not scale
- Difficult component reuse
Bootstrap 5 provides all the tools needed to avoid these problems — if used intentionally.
Step 1: Bootstrap 5 Setup (CDN)
We will use the Bootstrap 5 CDN to keep setup simple and aligned with modern best practices.
<!doctype html>
<html lang="en-GB">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap 5 Dashboard</title>
<!-- Bootstrap 5 CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<!-- Bootstrap 5 JS Bundle -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
Why this setup is important
- The viewport meta tag enables proper mobile scaling
- The bundle includes Popper (required later for Offcanvas)
- Bootstrap 5 removes jQuery entirely
Step 2: Establishing the Dashboard Page Structure
Dashboards benefit from clear separation between navigation, content, and overlays.
We start with a semantic, future-proof structure.
<body>
<header>
</header>
<main>
</main>
</body>
This structure allows:
- Sticky headers
- Scrollable content areas
- Clean integration of Offcanvas navigation
Step 3: Creating a Mobile-First Content Wrapper
Dashboards almost always require full-width layouts, not fixed containers.
<main class="min-vh-100 bg-light">
<div class="container-fluid p-3">
<!-- Dashboard content goes here -->
</div>
</main>
Design decisions explained
- container-fluid maximises usable space
- Utility padding replaces custom CSS
- min-vh-100 ensures full-height dashboards
Step 4: Preparing for Sidebar Navigation (Without Building It Yet)
Rather than hardcoding a static sidebar, we intentionally leave the layout flexible so it works seamlessly with Bootstrap 5 Offcanvas navigation later.
<div class="container-fluid p-3">
<div class="row">
<div class="col-12">
<h1 class="h4 mb-3">Dashboard</h1>
<p class="text-muted">
This is the base layout for our Bootstrap 5 dashboard.
</p>
</div>
</div>
</div>
This approach ensures:
- No layout conflicts on mobile
- Offcanvas overlays cleanly
- No unnecessary grid nesting
Screenshot: Empty Dashboard Layout
Live Preview
How This Fits with Offcanvas Navigation
This dashboard will use Bootstrap 5 Offcanvas for sidebar navigation.
If you have not already built the sidebar, complete the dedicated guide below before continuing:
What You Have After Part 1
At this stage, you have:
- A responsive Bootstrap 5 dashboard foundation
- Clean semantic structure
- Mobile-first layout decisions
- Compatibility with Offcanvas navigation
- A base that will not be refactored later
What's Next
In Part 2, we will build a responsive dashboard navbar designed specifically for admin interfaces and connect it to the Offcanvas sidebar.
Full tutorials
- Part 1: Offcanvas Sidebar Navigation (This Article)
- Part 2: Dashboard Layout & Structure
- Part 3: Accessibility & Link States
- Part 4: Production Ready
- Blog Home View more posts.