Skip to content

Bootstrap Admin Dashboard Layout

Bootstrap 5 admin dashboard with a responsive offcanvas sidebar, KPI cards, an SVG revenue chart, category meters and a filterable recent orders table.

Also known as: admin panel layout, dashboard layout with sidebar, back office dashboard, admin dashboard ui

Bootstrap Admin Dashboard Layout live demo

Open in new tab

Bootstrap 5 code (HTML, CSS, JS)

A complete Bootstrap 5 admin dashboard layout with a dark sidebar, a sticky top bar, four KPI cards, a daily revenue bar chart, category progress meters and a filterable recent orders table. Use it as the starting shell for an e-commerce back office, a SaaS admin panel or an internal reporting tool.

How it works

The root .dsh-app is a flex container. The navigation lives in aside.dsh-sidebar, which uses Bootstrap's responsive offcanvas-lg class: below 992px it is a slide-in offcanvas opened by the hamburger button in .dsh-topbar (data-bs-toggle="offcanvas"), and from the lg breakpoint up it becomes a sticky, full-height column whose width comes from --dsh-sidebar-w. The active link uses aria-current="page" and gets an accent bar through an inset shadow.

The .dsh-main column holds the sticky top bar (search, notification button and a Bootstrap dropdown for the user menu) and the .dsh-content area. KPI cards use row-cols-1 row-cols-sm-2 row-cols-xl-4, so they stack on phones and sit in one row on wide screens. The revenue chart is a plain inline SVG with rect.dsh-chart__bar elements that grow in with a CSS scaleY animation; no chart library is needed.

The script runs on DOMContentLoaded for every .dsh-app. It reads data-value from each .dsh-meter__fill and sets the bar width, and it wires the [data-dsh-filter] buttons in .dsh-orders: clicking one hides table rows whose data-status does not match, updates aria-pressed and rewrites the .dsh-count text.

Customization

  • --dsh-accent and --dsh-accent-rgb on .dsh-app in style.css: change the teal accent used by the active link, buttons, peak bar, meters and focus rings.
  • --dsh-sidebar-bg and --dsh-sidebar-text: recolor the sidebar background and its link text.
  • --dsh-sidebar-w: makes the desktop sidebar wider or narrower.
  • data-value on .dsh-meter__fill: sets each category bar (0 to 100); also update aria-valuenow on the parent .dsh-meter.
  • The y and height attributes of each rect.dsh-chart__bar: plot your own values (18 units per thousand in this chart); move dsh-chart__bar--peak to highlight a different day.
  • data-status on each order row plus a matching data-dsh-filter button: add statuses such as shipped; style the badge with a new .dsh-status--shipped rule.
  • row-cols-xl-4 on the KPI row: switch to row-cols-xl-3 if you show three metrics.

Use cases

  • E-commerce back offices: KPI cards, a revenue chart and a recent orders table give a daily overview
  • SaaS admin panels: a dark sidebar becomes an offcanvas menu on small screens
  • Internal reporting tools: category progress meters summarize performance at a glance
  • Order management: a filterable orders table helps staff find the right order fast

Accessibility

The sidebar is an offcanvas with aria-labelledby, a labelled close button and Bootstrap's focus trapping on small screens. Navigation sits in a labelled nav. Each KPI card is a section named by its heading. The chart has role="img" with a title and a desc that lists every value, and each meter is a role="progressbar" with aria-valuenow. The filter group has role="group", the buttons expose aria-pressed, and .dsh-count is a polite live region that announces how many orders are shown. All controls have visible focus rings, and the bar and meter animations are disabled under prefers-reduced-motion.

Usage notes

Requires Bootstrap 5.3 with its JS bundle and Bootstrap Icons. The layout uses fixed ids (dsh-sidebar, dsh-search-input), so place one dashboard per page. Replace the table rows with server-rendered data; the filter works on whatever rows exist.

Bootstrap Admin Dashboard Layout at a glance

Framework
Bootstrap 5
Code
HTML, CSS, JavaScript
JavaScript
Vanilla JavaScript, no jQuery
Dependencies
Bootstrap 5, Bootstrap Icons
Layout
Responsive, works on mobile
Category
Dashboards
License
Free for personal and commercial use

Questions about this template

Can I use the Bootstrap Admin Dashboard Layout code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

Load Bootstrap 5 and Bootstrap Icons from a CDN (the links are under Requirements). Paste the HTML where the component should appear, add the CSS to your stylesheet and load the JavaScript before the closing </body> tag. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. The script is plain vanilla JavaScript, so it works without jQuery, React or Vue. You can still use the markup inside those frameworks.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

Requirements

Add these to your page (already included in the download):

  • <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
  • <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
  • <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
Bootstrap Admin Dashboard Layout – free Bootstrap 5 dashboard template
Bootstrap Admin Dashboard Layout · free Bootstrap 5 dashboard template

More Dashboards

Admin Dashboard Layout – free Tailwind CSS dashboard template

Admin Dashboard Layout

Dark Tailwind CSS admin dashboard with off-canvas sidebar, topbar search, KPI cards, SVG revenue chart with date ranges and an orders table.