Foresite Design Editorial Team

Foresite Design Editorial Team · January 2026

Bootstrap 5 dashboard layout

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.


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:

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

Empty Bootstrap 5 dashboard layout foundation without sidebar

Live Preview

Live preview of Bootstrap 5 dashboard layout foundation

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:

Bootstrap 5 Offcanvas sidebar navigation tutorial for dashboards

What You Have After Part 1

At this stage, you have:

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