SB Admin Bootstrap 5 Admin Dashboard Template
A free, responsive admin dashboard built with Bootstrap 5 for developers who need a ready‑made interface.
By StartBootstrap startbootstrap/startbootstrap-sb-admin 3,300 stars
Introduction
SB Admin is a free, responsive admin dashboard template built with Bootstrap 5. It provides a ready‑made interface for developers who need a starter admin panel. The project is open source and released under the MIT license.
What this project offers
- A set of ready‑to‑use HTML pages for common admin tasks (dashboard, charts, tables, authentication, error pages).
- A responsive layout that works on mobile and desktop browsers.
- Integration with Bootstrap 5 components and Font Awesome icons.
- Source files written in Pug, SCSS and JavaScript, allowing you to customize the design and behavior.
Main features
- Dashboard overview page with navigation bar and side menu.
- Charts page with data tables.
- Tables page with sortable rows.
- Login, register and password‑reset pages.
- Error pages (401, 404, 500).
- Side navigation with collapsible menus and a static navigation layout option.
- Top navigation bar with user dropdown.
- Built‑in Font Awesome icons.
Technology stack
- HTML – final pages in the
dist/folder. - SCSS – compiled to
dist/css/styles.css. - JavaScript – bundled into
dist/js/scripts.js. - Pug – template language used in the
src/pug/source. - Node.js and npm – build tools.
- Bootstrap 5.2.3 – UI framework.
Requirements
- Node.js (any recent version).
- npm (comes with Node.js).
- A web browser to view the generated pages.
Installation
These steps assume you have downloaded the ZIP file sb-admin-bootstrap5.zip and extracted it to a folder on your computer.
- Open a terminal in the extracted folder.
cd path/to/sb-admin-bootstrap5
- Install the Node.js dependencies defined in
package.json.
npm install
- Run the build script to compile Pug, SCSS, JavaScript and copy assets into the
dist/directory.
npm run build
The build process creates the following files in dist/:
index.html(dashboard entry point) and the other 10 HTML pages.css/styles.css(compiled stylesheet).js/scripts.jsand other JS files.assets/containing images and demo assets.
- Open the dashboard in a browser.
# On macOS or Linux
open dist/index.html
# On Windows
start dist\\index.html
You can also serve the dist/ folder with any static web server if you prefer.
Configuration
The project does not require additional configuration to run. If you need to change the build behavior, edit the scripts in the scripts/ folder or modify the package.json scripts. The source files are located in src/:
src/pug/– Pug templates for pages and layouts.src/scss/– SCSS files (styles.scssimports variables, layout, navigation, plugins).src/js/– JavaScript source files.
Customizing the project
- HTML: Edit the generated files in
dist/for quick tweaks. - Pug: Modify files under
src/pug/and re‑runnpm run buildto regenerate the HTML. - SCSS: Change variables in
src/scss/_variables.scssor add new styles insrc/scss/. Re‑run the build to updatedist/css/styles.css. - JavaScript: Add or edit scripts in
src/js/. After changes, run the build again.
Project structure
LICENSE
README.md
package.json
package-lock.json
dist/
401.html
404.html
500.html
charts.html
css/
styles.css
index.html
js/
datatables-simple-demo.js
scripts.js
layout-sidenav-light.html
layout-static.html
login.html
password.html
register.html
tables.html
src/
assets/
demo/
img/
js/
datatables-simple-demo.js
scripts.js
pug/
layouts/
pages/
scss/
_global.scss
_variables.scss
layout/
navigation/
plugins/
styles.scss
scripts/
build-assets.js
build-pug.js
build-scripts.js
build-scss.js
clean.js
start.js
start-debug.js
Tips
- Use
npm startto build the project and launch a live preview with BrowserSync. The command watches source files and reloads the browser on changes. - For debugging, run
npm run start:debugto start the server without live‑reload. - Keep the
dist/folder under version control only if you want to distribute the pre‑built files; otherwise, commit the source (src/) and let each developer build locally.
License and attribution
The project is licensed under the MIT License. See the full license file at https://github.com/startbootstrap/startbootstrap-sb-admin/blob/master/LICENSE. When redistributing or using the template, keep the LICENSE file and credit the original author as required by the MIT terms.
Use this prompt with an AI coding assistant (Claude Code, Cursor, ChatGPT and similar) to add SB Admin Bootstrap 5 Admin Dashboard Template to a website or app you already have.
- Download the ZIP and put the project next to your own code.
- Fill in the bracketed parts, such as
[describe your stack]. - Paste the prompt into your assistant and review each change it proposes.
# Integrate SB Admin Bootstrap 5 Admin Dashboard Template **Role** You are a senior frontend developer assisting me in adding the SB Admin Bootstrap 5 Admin Dashboard Template to my existing web application. **Project description** SB Admin is a free, responsive admin dashboard built with Bootstrap 5. It provides a set of ready‑made pages (dashboard, charts, tables, authentication, error pages) and UI components such as a collapsible side navigation, top navigation bar, Font Awesome icons, and responsive layout. **Source project** - Repository: https://github.com/startbootstrap/startbootstrap-sb-admin - License: MIT - Framework: Bootstrap 5 (dependency version 5.2.3) - Build tooling (npm scripts): `build`, `build:pug`, `build:scss`, `build:scripts`, `build:assets`, `clean`, `start`, `start:debug` - Development dependencies: autoprefixer, browser-sync, chokidar, concurrently, postcss, prettier, pug, sass, shelljs, upath - Source directories: `src/` (pug, scss, js, assets) and `dist/` (pre‑built HTML, CSS, JS, assets) **Target project context** - Stack: `[describe your stack, e.g., Laravel 11 + Blade]` - UI insertion point: `[where the admin UI should appear, e.g., inside a <div id="admin-root"></div>]` - Existing CSS framework: `[e.g., Tailwind, Bootstrap 4, none]` **Integration objectives** - Add the SB Admin layout (sidebar, top bar) to the designated UI area. - Import the dashboard, charts, tables, and authentication pages as needed. - Reuse SB Admin’s SCSS variables and component styles without breaking existing styles. **Required components** - Layout files: `dist/layout-sidenav-light.html`, `dist/layout-static.html` - Main pages: `dist/index.html` (dashboard), `dist/charts.html`, `dist/tables.html` - Authentication pages: `dist/login.html`, `dist/register.html`, `dist/password.html` - Error pages: `dist/401.html`, `dist/404.html`, `dist/500.html` - Navigation markup (sidebar and top bar) found in the layout files. - Stylesheet: `dist/css/styles.css` - Scripts: `dist/js/scripts.js`, `dist/js/datatables-simple-demo.js` **Layout and styling requirements** 1. Keep SB Admin’s Bootstrap classes scoped to the admin container (e.g., wrap the imported markup in `<div class="sb-admin">`). 2. If the existing app already loads Bootstrap 5, do not load the library again; rely on the existing instance. 3. Ensure any custom SCSS from `src/scss/` is compiled into a separate file (e.g., `admin-custom.css`) and loaded after the main stylesheet to allow overrides. **Asset management** - Copy the compiled CSS file `dist/css/styles.css` to the target’s assets folder (e.g., `public/css/` or equivalent). - Copy the compiled JS files `dist/js/scripts.js` and `dist/js/datatables-simple-demo.js` to the target’s JS assets folder. - Copy the `dist/assets/` directory (fonts, images) preserving the same relative paths. - If the target already includes Font Awesome via CDN, you can omit the `` tag. - Use a CDN for the Simple‑DataTables CSS (`https://cdn.jsdelivr.net/npm/simple-datatables@7.1.2/dist/style.min.css`) only if the target does not already provide it. **Routing and navigation** - Map each SB Admin HTML page to an existing route in the target application (e.g., `/admin/dashboard` → `dist/index.html`). - Preserve the original URLs by serving the copied HTML files at the same paths or by rendering their content through the target’s templating engine. - Update navigation links (`href="index.html"`, etc.) to the new route paths. **Responsive requirements** - The template already includes a responsive meta tag and uses Bootstrap’s grid system. Ensure the target’s viewport meta tag is present and not duplicated. **Accessibility requirements** - Retain the existing ARIA attributes and semantic markup from the template (e.g., `aria-label`, `role="navigation"`). - Verify that any custom interactive elements added later receive appropriate keyboard focus handling. **Compatibility requirements** - Bootstrap version required: 5.2.3 (as declared in `package.json`). - SCSS compiled with Sass 1.60.0 and PostCSS 8.4.21. - A build step is required if you want to modify source SCSS or Pug files; otherwise, use the pre‑built files in `dist/`. **Preserve the existing application** 1. **First step:** Inspect the current codebase before changing any file. 2. Do not replace or rewrite existing authentication, routing, state management, or data‑layer code. 3. Make only small, isolated changes (e.g., add new files under an `admin/` folder). 4. Ask for confirmation before deleting any existing files or dependencies. **Testing and verification checklist** - [ ] Verify that the admin UI loads without JavaScript errors. - [ ] Confirm that Bootstrap styles from SB Admin do not override the main site’s styles. - [ ] Check that all navigation links point to the correct routes. - [ ] Test the dashboard, charts, and tables for proper data rendering. - [ ] Ensure the login, register, and password pages work with the existing authentication flow. - [ ] Validate responsive behavior on mobile, tablet, and desktop viewports. - [ ] Run an accessibility audit (e.g., axe) to confirm no new violations. - [ ] Confirm that Font Awesome icons and Simple‑DataTables styles appear correctly. - [ ] Verify that the build process (if used) outputs the expected files in `dist/`. - [ ] Ensure no duplicate copies of Bootstrap or other libraries are loaded.
