Vue 3 Admin Dashboard with Charts and Dark Mode - CoreUI
A Vue 3 admin dashboard template built with CoreUI components, suitable for developers needing a ready‑made UI with charts and dark mode.
By coreui coreui/coreui-free-vue-admin-template 3,407 stars
Introduction
CoreUI Free Vue Admin Template is a free, open‑source admin dashboard built with Vue 3 and CoreUI components. It provides a responsive layout, dark‑mode support, and a set of ready‑made pages such as charts, widgets, authentication, and error pages. The project is licensed under the MIT License.
What this project offers
- A complete admin interface ready for customization.
- Ready‑made UI components (header, footer, sidebar, breadcrumbs, etc.).
- Integration with Pinia for state management and Vue Router for navigation.
- Chart.js based visualizations and a collection of reusable widgets.
- Dark‑mode toggle and responsive design that works on desktop and mobile devices.
Main features
- Responsive layout that adapts to any screen size.
- Dark mode support out of the box.
- Sidebar navigation with configurable menu items.
- Header with user dropdown and notification area.
- Footer component.
- Charts powered by Chart.js.
- Various widgets and card components.
- Authentication pages (login, register, etc.).
- Error pages (404, 500, etc.).
- Form components for data entry.
Technology stack
- Vue 3
- Vite (build tool)
- CoreUI component library
- Pinia (state management)
- Vue Router
- Chart.js
- Sass / PostCSS for styling
- Popper.js for dropdown positioning
Requirements
- Node.js (any recent LTS version)
- npm or Yarn package manager
Installation
Follow these steps after downloading the ZIP file /download/coreui-vue-admin.zip.
- Extract the archive
unzip coreui-vue-admin.zip -d coreui-vue-admin
cd coreui-vue-admin
- Install dependencies
npm install
or, if you prefer Yarn
yarn install
- Run the development server (optional, to see changes live)
npm run dev
The app will be served at http://localhost:3000.
- Build the production files
npm run build
The build script vite build creates a dist/ directory containing the compiled HTML, JavaScript, and CSS files.
- Preview the built version (optional)
npm run preview
This starts a local server that serves the contents of dist/.
Configuration
- Vite configuration is located in
vite.config.mjs. - Environment variables can be added to a
.envfile; Vite will expose variables prefixed withVITE_. - Theme settings (light/dark) are managed in
src/stores/theme.js. - Sidebar navigation is defined in
src/_nav.js. - Routing is configured in
src/router/index.js.
Adjust these files to match your project requirements.
Customizing the project
- Styling: edit the SCSS files in
src/styles/(style.scss,examples.scss, and files undervendors/). - Components: add or modify Vue components in
src/components/. - Views: create new pages under
src/views/and register routes insrc/router/index.js. - State: extend Pinia stores in
src/stores/.
All changes are automatically reflected when running the development server.
Project structure
coreui-free-vue-admin-template/
├─ public/ # static assets (icons, manifest, favicons)
├─ src/
│ ├─ assets/ # images, icons, etc.
│ ├─ components/ # UI components (header, footer, sidebar, etc.)
│ ├─ layouts/ # layout containers
│ ├─ styles/ # SCSS files
│ ├─ router/ # Vue Router configuration
│ ├─ stores/ # Pinia stores
│ ├─ views/ # page components (dashboard, charts, auth, etc.)
│ ├─ App.vue
│ ├─ main.js
│ └─ _nav.js # sidebar navigation definition
├─ index.html # HTML template
├─ package.json
├─ vite.config.mjs
└─ README.md
Tips
- Use
npm run devwhile developing; Vite provides hot‑module replacement for instant feedback. - After building, the
dist/folder can be deployed to any static‑file host (Netlify, Vercel, GitHub Pages, etc.). - The
src/styles/style.scssfile imports CoreUI’s base styles; you can add custom variables before the import to override defaults. - Pinia stores (
sidebar.js,theme.js) are good places to keep UI state such as the collapsed sidebar or current theme.
License and attribution
The project is released under the MIT License. See the full license file at https://github.com/coreui/coreui-free-vue-admin-template/blob/main/LICENSE. When redistributing or modifying the template, keep the LICENSE file and retain the original copyright notice. Credit the original author as required by the license.
Use this prompt with an AI coding assistant (Claude Code, Cursor, ChatGPT and similar) to add CoreUI 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 CoreUI Free Vue Admin Template **Role** You are a senior frontend developer assisting me in adding the CoreUI Free Vue Admin Template to my existing application. **Project description** CoreUI Free Vue Admin Template is a free Vue 3 admin dashboard built with CoreUI components. It provides a responsive layout, dark‑mode support, sidebar navigation, header with user dropdown, footer, Chart.js charts, widgets, authentication pages, error pages, and form components. **Source project** - Repository: https://github.com/coreui/coreui-free-vue-admin-template - License: MIT - Framework: Vue 3 (version ^3.5.41) - Build tool: Vite (version ^8.2.1) - Main dependencies: - @coreui/coreui ^5.9.0 - @coreui/vue ^5.10.0 - @coreui/chartjs ^4.2.0 - @coreui/vue-chartjs ^3.0.0 - @coreui/icons ^3.1.0, @coreui/icons-vue 2.2.0 - chart.js ^4.5.1 - pinia ^4.0.2 - simplebar-vue ^2.4.2 - vue-router ^5.2.0 - Dev dependencies include @vitejs/plugin-vue, sass, postcss, autoprefixer, eslint, and vite. - Source files of interest: - `src/App.vue` - `src/main.js` - `src/router/index.js` - `src/store/` (sidebar.js, theme.js) - Layout: `src/layouts/DefaultLayout.vue` - Core UI components under `src/components/` (AppHeader.vue, AppSidebar.vue, AppFooter.vue, etc.) - Views under `src/views/` (dashboard, charts, widgets, authentication, error‑pages, forms, etc.) - Navigation config: `src/_nav.js` - Styles: `src/styles/style.scss`, `src/styles/examples.scss` **Target project context** - [Describe your stack, e.g., Laravel 11 + Blade, Express + EJS, etc.] - [Specify where the UI should be placed, e.g., inside the admin section, as a new route group, etc.] - [State any existing CSS framework or design system you are using, e.g., Bootstrap 5, Tailwind 3, custom SCSS, etc.] **Integration objectives** - Add the CoreUI layout (header, sidebar, footer) to the admin area. - Reuse CoreUI components for dashboards, charts, widgets, and forms. - Keep existing authentication, routing, state management, and backend integration untouched. - Preserve current visual style of the host app while allowing CoreUI dark mode and responsive behavior. **Required components** - Layout: `src/layouts/DefaultLayout.vue` - Navigation: `src/_nav.js` and `src/components/AppSidebar.vue` - Header: `src/components/AppHeader.vue` and `src/components/AppHeaderDropdownAccnt.vue` - Footer: `src/components/AppFooter.vue` - Core pages to import (copy or reference): - `src/views/dashboard/` (dashboard home) - `src/views/charts/` (Chart.js examples) - `src/views/widgets/` (widget cards) - `src/views/forms/` (form components) - `src/views/authentication/` (login, register) – only if needed - `src/views/error-pages/` (404, 500) – optional - Store modules: `src/store/sidebar.js`, `src/store/theme.js` (if theme toggling is required). **Layout and styling requirements** - Scope CoreUI SCSS by importing it inside a dedicated stylesheet (e.g., `src/styles/coreui.scss`) and prefixing any global selectors with a unique class (e.g., `.coreui-wrapper`). - Use Vue’s `` where possible to avoid leaking styles into the host app. - If the host app already uses a CSS framework, ensure CoreUI’s CSS does not override its base styles; keep CoreUI’s CSS after the host’s CSS in the build order. - Preserve design tokens by mapping CoreUI colors to the host’s variables if you want a unified look. **Asset management** - Static assets are in `public/` (icons, favicons, images). Copy only the needed files into the host’s public/static folder, preserving the same relative paths. - JavaScript modules are imported from `src/` – add the component files to the host’s source tree (e.g., `src/coreui/`). - SCSS files are under `src/styles/`; import them in the host’s main SCSS entry point. - Do not duplicate libraries that already exist in the host (e.g., if the host already uses Vue 3, Pinia, or Chart.js, rely on the existing versions). Add missing dependencies to the host’s `package.json` only when they are not present. **Routing and navigation** - Add CoreUI routes to the host’s router configuration (e.g., in `router/index.js`), using the same path structure as the template (`/dashboard`, `/charts`, `/widgets`, etc.). - Preserve existing URLs by nesting CoreUI routes under a prefix if needed (e.g., `/admin/dashboard`). - Use the existing router instance; do not replace it. **Responsive requirements** - CoreUI already includes responsive breakpoints; ensure the host’s viewport meta tag matches ``. - Test the layout on mobile, tablet, and desktop sizes after integration. **Accessibility requirements** - CoreUI components include ARIA attributes; keep them unchanged. - Verify that focus order works with the host’s existing interactive elements. - Ensure color contrast meets WCAG AA, especially when dark mode is enabled. **Compatibility requirements** - Vue version ^3.5.41, Vite ^8.2.1, and the listed CoreUI packages must be compatible with the host’s versions. - If the host uses a different Vue version, confirm compatibility or adjust the dependency version accordingly. - A build step is required (`npm run build` or `vite build`) to generate production assets. **Preserve the existing application** - First, inspect the current codebase before modifying any file. - Do not replace or rewrite authentication, routing, state, or data‑layer code that already exists. - Make only small, isolated changes (add new files, update imports, extend router). - Ask for confirmation before deleting or overwriting any existing file. **Testing and verification checklist** - [ ] Run the host’s test suite (if any) after adding CoreUI files. - [ ] Verify that the new admin routes load without errors. - [ ] Check that the sidebar toggles correctly and does not interfere with existing navigation. - [ ] Confirm that Chart.js charts render and use the host’s data sources. - [ ] Test dark‑mode toggle (if used) and ensure it does not affect other parts of the app. - [ ] Validate responsive layout on at least three viewport sizes. - [ ] Run an accessibility audit (e.g., axe) on the integrated pages. - [ ] Ensure no duplicate dependencies are installed (run `npm ls` or `yarn list`). - [ ] Build the project (`npm run build`) and confirm that the output contains the CoreUI assets and that the host’s existing assets are still present.
