Bootstrap 5 Admin Dashboard with Dark Mode - AdminKit
A free, open‑source Bootstrap 5 admin dashboard with dark mode, charts, tables and icons. Ideal for developers building internal tools.
By adminkit adminkit/adminkit 1,662 stars
Introduction
AdminKit is a free, open‑source admin dashboard template built with Bootstrap 5. It provides a ready‑made interface for developers who need a modern, responsive admin panel with dark‑mode support.
What this project offers
- A collection of 20 ready HTML pages (dashboard, charts, tables, forms, authentication, etc.).
- Dark mode that follows the user’s system preference.
- Integration with Chart.js, Google Maps, and Lucide icons.
- A responsive sidebar that collapses on small screens.
- Ready‑to‑use UI components such as alerts, buttons, cards, modals, and typography.
Main features
- Dark mode with auto detection.
- Responsive sidebar.
- Chart.js charts for analytics.
- Google Maps page.
- Sign‑in and sign‑up authentication pages.
- Various UI components (alerts, buttons, cards, forms, modals, typography).
- Bootstrap‑styled tables.
- Sample pages for invoices, pricing, user profiles, and a “Upgrade to Pro” promotional page.
- Icon library powered by Lucide.
Technology stack
- Framework: Bootstrap 5
- Build tool: Vite 8
- Styling: Sass 1.107
- Charts: Chart.js 4
- Tooltips & popovers: @popperjs/core 2
- Icons: Lucide 1
- Other libraries: jsvectormap, simplebar, vanilla-calendar-pro, Handlebars (used for page templating)
Requirements
- Node.js ≥ 24
- npm (comes with Node.js)
- A web browser for testing the built files
Installation
- Download the ZIP archive
/download/adminkit-bootstrap5-dashboard.zip
- Extract the archive
unzip adminkit-bootstrap5-dashboard.zip
cd adminkit
- Install the Node.js dependencies
npm install
- Build the production files (the
buildscript runs Vite)
npm run build
- Locate the built output – Vite writes the compiled assets to the
dist/folder. Opendist/index.htmlin a browser to view the dashboard locally, or upload the entiredist/directory to any static‑file web host.
Configuration
The project uses a Vite configuration file (vite.config.js) and a PostCSS configuration (postcss.config.mjs). Most settings are ready‑to‑use, but you can adjust:
- Port for the development server – modify the
devscript or pass--port <number>tovite. - Environment variables – create a
.envfile at the project root if you need to inject custom variables; Vite will expose them asimport.meta.env.VAR_NAME.
Customizing the project
- Styling – edit the SCSS files under
src/scss/. The main entry point issrc/scss/app.scss. After changes, runnpm run buildagain to regenerate the CSS. - JavaScript – main scripts are in
src/js/. Add or modify modules and rebuild. - Pages – HTML pages are Handlebars templates located in
src/pages/. You can edit the raw HTML or the Handlebars partials insrc/partials/. - Icons – the icon list is generated from
src/data/icons-lucide.json. Use the provided npm scriptnpm run icons:listto see available icons.
Project structure
src/
data/ # JSON data used by templates
helpers/ # Utility functions
js/ # JavaScript entry points
layouts/ # Handlebars layout files
pages/ # HTML pages (20 files)
partials/ # Reusable Handlebars components
scss/ # Sass source files
public/
img/ # Images, avatars, icons, screenshots
scripts/ # Build‑time helper scripts
vite.config.js
postcss.config.mjs
package.json
README.md
LICENSE
Tips
- Run
npm start(ornpm run dev) to start a local development server with hot‑module replacement. The server opens automatically in your default browser. - Use
npm run lintto check code quality andnpm run formatto automatically format files. - After editing SCSS or JavaScript, always rebuild with
npm run buildto update the files indist/. - The built
dist/folder contains only static assets, so it can be served from any static‑file host (GitHub Pages, Netlify, Vercel, etc.).
License and attribution
The project is licensed under the MIT License. See the full license file at the repository: https://github.com/adminkit/adminkit/blob/main/LICENSE. When redistributing or using the template, keep the LICENSE file and give credit to the original authors as required by the MIT terms.
Use this prompt with an AI coding assistant (Claude Code, Cursor, ChatGPT and similar) to add AdminKit 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 AdminKit Bootstrap 5 Admin Dashboard Template **Role** You are a senior frontend developer. Your task is to help me add the AdminKit Bootstrap 5 Admin Dashboard Template into my existing web application while preserving the current codebase. **Project description** AdminKit is a free, open‑source HTML admin dashboard built with Bootstrap 5. It provides a dark‑mode aware layout, responsive sidebar, charts (Chart.js), maps, authentication pages, and many UI components such as alerts, buttons, cards, forms, modals, tables, and typography. The source uses Vite, Sass, Handlebars, and plain JavaScript (no jQuery). **Source project** - Repository: https://github.com/adminkit/adminkit - License: MIT - Framework: Bootstrap 5 (version 5.3.8) - Build tooling: Vite 8.3.5, Sass 1.107.1, Handlebars (via `vite-plugin-handlebars`) - Runtime dependencies: - `@fontsource/inter` 5.3.0 - `@popperjs/core` 2.11.8 - `bootstrap` 5.3.8 - `chart.js` 4.6.1 - `jsvectormap` 1.7.0 - `lucide` 1.66.0 - `simplebar` 6.3.3 - `vanilla-calendar-pro` 3.4.0 **Target project context** - Stack: `[describe your stack, e.g. Laravel 11 + Blade]` - UI insertion point: `[where the UI should go, e.g. inside a <div id="admin-root">]` - Existing CSS framework: `[e.g. Tailwind, Bootstrap 4, none]` **Integration objectives** - Bring over the main layout (header, sidebar, footer) - Add the responsive sidebar and dark‑mode handling - Import reusable UI components (alerts, buttons, cards, forms, modals, tables, typography) - Include selected pages such as dashboard, charts, tables, and authentication forms - Keep existing application logic (routing, authentication, state) untouched. **Required components** - Layout templates: `src/layouts/default.hbs`, `src/layouts/auth.hbs` - Partial templates: `src/partials/site-navbar.hbs`, `src/partials/site-sidebar.hbs`, `src/partials/site-footer.hbs` - Core scripts: `src/js/app.js`, `src/js/head.js` - Styles: `src/scss/app.scss` and all SCSS files under `src/scss/` - HTML pages to adapt (copy content only, not the full file): - `src/pages/index.html` (dashboard) - `src/pages/charts-chartjs.html` - `src/pages/tables-bootstrap.html` - `src/pages/pages-sign-in.html` - `src/pages/pages-sign-up.html` - `src/pages/pages-profile.html` - `src/pages/ui-alerts.html`, `ui-buttons.html`, `ui-cards.html`, `ui-forms.html`, `ui-modals.html`, `ui-typography.html` - Icon data: `src/data/icons-lucide.json` (used by `lucide`) **Layout and styling requirements** - Scope all AdminKit CSS under a custom class (e.g., `.adminkit`) to avoid clashes with existing styles. Wrap the imported markup in a container `<div class="adminkit">…</div>`. - If the target already uses Bootstrap, ensure both versions are the same (Bootstrap 5.3.8). If a different version is present, keep the existing one and do not load a second copy. - Preserve dark‑mode CSS variables; they are defined in `src/scss/` and rely on Bootstrap’s color‑mode utilities. **Asset management** - Copy the compiled assets from `dist/` after running `npm run build` into the target’s public assets folder (e.g., `public/vendor/adminkit/`). - For a bundler‑based project, import the SCSS entry `src/scss/app.scss` and the JS entry `src/js/app.js` into the existing build pipeline. - Do not duplicate libraries that already exist in the target (Bootstrap, Popper, Chart.js). Use the target’s versions if they match; otherwise, add AdminKit’s versions as peer dependencies. - Images and fonts are located under `public/img/` and should be copied preserving the directory structure. **Routing and navigation** - Map AdminKit pages to the target’s route definitions. For example: - `/admin` → dashboard (`src/pages/index.html`) - `/admin/charts` → `charts-chartjs.html` - `/admin/tables` → `tables-bootstrap.html` - `/admin/login` → `pages-sign-in.html` - `/admin/register` → `pages-sign-up.html` - Keep the original URLs of the existing application; only add the new `/admin/*` routes. **Responsive requirements** - The sidebar automatically collapses on small screens via Bootstrap’s off‑canvas utilities. Ensure the target’s viewport meta tag (``) is present. - Test layout on typical breakpoints (≥1200 px, 992 px, 768 px, ≤576 px). **Accessibility requirements** - AdminKit targets WCAG 2.2 AA. Preserve ARIA attributes from the Handlebars partials and HTML pages. - Verify focus order, keyboard navigation for the sidebar, and sufficient color contrast in both light and dark modes. **Compatibility requirements** - Requires Node >= 24 and npm. - Build step: run `npm install` then `npm run build` to generate the `dist/` folder before copying assets. - Ensure the target’s build system can process Sass (`.scss`) and Vite‑style imports, or adapt the compiled CSS/JS manually. **Preserve the existing application** - First, inspect the current codebase before modifying any file. - Do not replace or rewrite existing authentication, routing, state management, or data layers. - Make only small, reviewable changes: add new files under a dedicated `adminkit/` directory, update import maps, and adjust route definitions. - Ask for confirmation before deleting or overwriting any existing file. **Testing and verification checklist** - [ ] Run the existing application’s test suite and confirm all original tests still pass. - [ ] Verify the AdminKit assets load without console errors (missing CSS/JS, duplicate libraries). - [ ] Check that the dashboard appears at the configured `/admin` route and respects the target’s layout container. - [ ] Confirm dark‑mode toggles correctly based on system preference and manual switch. - [ ] Test sidebar collapse/expand behavior on mobile breakpoints. - [ ] Validate that all imported components (alerts, forms, tables, charts) render and are interactive. - [ ] Run an accessibility audit (e.g., axe) to ensure no new violations. - [ ] Ensure navigation to existing non‑admin routes remains unchanged. - [ ] Confirm that image and font assets are served correctly from the new location. - [ ] Document any required manual steps for future builds or deployments.


