├── .gitignore ├── README.md ├── babel.config.js ├── capture.png ├── package-lock.json ├── package.json ├── postcss.config.js ├── public ├── favicon.ico └── index.html ├── src ├── App.vue ├── assets │ ├── css │ │ └── tailwind.css │ └── logo.png ├── components │ ├── Dashboard.vue │ ├── Footer.vue │ ├── Navbar.vue │ └── Sidebar.vue ├── main.js ├── pages │ └── Home.vue └── store │ └── index.js └── tailwind.js /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw? 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Vue-Tailwind - Admin Template 2 | A simple admin template built using [TailwindCSS](https://tailwindcss.com) & [Vue.js](https://vuejs.org). This project is also running [Vuex](https://vuex.vuejs.org) in order to control the sidebar state throughout components. 3 | 4 | 5 | #### Screenshot 6 | ![alt text](./capture.png) 7 | 8 | #### Project setup 9 | ``` 10 | npm install 11 | ``` 12 | 13 | #### Compiles and hot-reloads for development 14 | ``` 15 | npm run serve 16 | ``` 17 | 18 | #### License 19 | MIT License. 20 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /capture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Armando99Rdz/admin-dashboard-vue-tailwind/ab30708949e03e998a52c0ac00450ed8cf788895/capture.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-tailwind-admin", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "chart.js": "^2.9.3", 12 | "core-js": "^3.6.4", 13 | "vue": "^2.6.11", 14 | "vue-chartjs": "^3.5.0", 15 | "vue-router": "^3.1.5", 16 | "vuex": "^3.1.2" 17 | }, 18 | "devDependencies": { 19 | "@vue/cli-plugin-babel": "^4.2.0", 20 | "@vue/cli-plugin-eslint": "^4.2.0", 21 | "@vue/cli-service": "^4.2.0", 22 | "babel-eslint": "^10.0.3", 23 | "eslint": "^6.7.2", 24 | "eslint-plugin-vue": "^6.1.2", 25 | "tailwindcss": "^1.2.0", 26 | "vue-template-compiler": "^2.6.11" 27 | }, 28 | "eslintConfig": { 29 | "root": true, 30 | "env": { 31 | "node": true 32 | }, 33 | "extends": [ 34 | "plugin:vue/essential", 35 | "eslint:recommended" 36 | ], 37 | "parserOptions": { 38 | "parser": "babel-eslint" 39 | }, 40 | "rules": {} 41 | }, 42 | "browserslist": [ 43 | "> 1%", 44 | "last 2 versions" 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "plugins": [ 3 | require('tailwindcss')('tailwind.js'), 4 | require('autoprefixer')() 5 | ] 6 | } -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Armando99Rdz/admin-dashboard-vue-tailwind/ab30708949e03e998a52c0ac00450ed8cf788895/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /src/assets/css/tailwind.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap'); 2 | 3 | @tailwind base; 4 | @tailwind components; 5 | @tailwind utilities; 6 | 7 | :root { 8 | --gray: #f4f5f7; 9 | --gray-hover: #e4e7eb; 10 | --pink: #d62468; 11 | --purple: #7e3af2; 12 | --purple-light: #8751fa; 13 | --orange: #ff5a1f; 14 | --green: #32c48c; 15 | } 16 | 17 | body { 18 | font-family: 'Inter', sans-serif; 19 | } 20 | 21 | body::-webkit-scrollbar { 22 | display: none; 23 | } 24 | 25 | .overlay { 26 | position: relative; 27 | } 28 | 29 | /* 1024 -1 so it doesnt show when it hits 1024px */ 30 | @media only screen and (max-width: 1023px) { 31 | .overlay:after { 32 | content: " "; 33 | z-index: 29; 34 | display: block; 35 | height: 100%; 36 | top: 80px; 37 | left: 0; 38 | right: 0; 39 | background: rgba(0, 0, 0, 0.5); 40 | pointer-events: none; 41 | position: fixed; 42 | } 43 | } 44 | 45 | .bg-gray-25 { 46 | background-color: var(--gray); 47 | } 48 | .bg-gray-30 { 49 | background-color: var(--gray-hover); 50 | } 51 | .hover\:bg-gray-30:hover { 52 | background-color: var(--gray-hover); 53 | } 54 | 55 | .bg-pink { 56 | background-color: var(--pink); 57 | } 58 | .text-pink { 59 | color: var(--pink); 60 | } 61 | 62 | .bg-purple { 63 | background-color: var(--purple); 64 | } 65 | .text-purple { 66 | color: var(--purple); 67 | } 68 | .bg-purple-light { 69 | background-color: var(--purple-light); 70 | } 71 | .text-purple-light { 72 | color: var(--purple-light); 73 | } 74 | .hover\:text-purple:hover { 75 | color: var(--purple); 76 | } 77 | .hover\:bg-purple:hover { 78 | background-color: var(--purple); 79 | } 80 | .hover\:bg-purple-light:hover{ 81 | background-color: var(--purple-light); 82 | } 83 | 84 | .bg-orange { 85 | background-color: var(--orange); 86 | } 87 | .text-orange { 88 | color: var(--orange); 89 | } 90 | 91 | .bg-green { 92 | background-color: var(--green); 93 | } 94 | .text-green { 95 | color: var(--green); 96 | } -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Armando99Rdz/admin-dashboard-vue-tailwind/ab30708949e03e998a52c0ac00450ed8cf788895/src/assets/logo.png -------------------------------------------------------------------------------- /src/components/Dashboard.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 41 | -------------------------------------------------------------------------------- /src/components/Footer.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | -------------------------------------------------------------------------------- /src/components/Navbar.vue: -------------------------------------------------------------------------------- 1 | 51 | 52 | -------------------------------------------------------------------------------- /src/components/Sidebar.vue: -------------------------------------------------------------------------------- 1 | 79 | 80 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | import Router from 'vue-router' 4 | 5 | import Dashboard from '@/components/Dashboard' 6 | import DashboardHome from '@/pages/Home' 7 | 8 | import store from './store' 9 | 10 | import '@/assets/css/tailwind.css' 11 | 12 | 13 | Vue.config.productionTip = false 14 | 15 | Vue.use(Router) 16 | 17 | const routes = [ 18 | { path: '/', redirect: { name: 'DashboardHome' } }, 19 | { path: '/dashboard', component: Dashboard, children: [ 20 | { path: '/', redirect: { name: 'DashboardHome' } }, 21 | { path: 'home', name: 'DashboardHome', component: DashboardHome } 22 | ] 23 | } 24 | ] 25 | 26 | const router = new Router({ 27 | mode: 'history', 28 | routes 29 | }) 30 | 31 | new Vue({ 32 | render: h => h(App), 33 | router, 34 | store 35 | }).$mount('#app') 36 | 37 | -------------------------------------------------------------------------------- /src/pages/Home.vue: -------------------------------------------------------------------------------- 1 | 389 | 390 | -------------------------------------------------------------------------------- /src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | 4 | Vue.use(Vuex) 5 | 6 | export default new Vuex.Store({ 7 | state: { 8 | sideBarOpen: false 9 | }, 10 | getters: { 11 | sideBarOpen: state => { 12 | return state.sideBarOpen 13 | } 14 | }, 15 | mutations: { 16 | toggleSidebar (state) { 17 | state.sideBarOpen = !state.sideBarOpen 18 | } 19 | }, 20 | actions: { 21 | toggleSidebar(context) { 22 | context.commit('toggleSidebar') 23 | } 24 | } 25 | }) 26 | -------------------------------------------------------------------------------- /tailwind.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | theme: { 3 | extend: {} 4 | }, 5 | variants: {}, 6 | plugins: [] 7 | } 8 | --------------------------------------------------------------------------------