├── .gitignore ├── CHANGELOG.md ├── ISSUE_TEMPLATE.md ├── LICENSE ├── README.md ├── genezio.yaml ├── index.html ├── jsconfig.json ├── package.json ├── postcss.config.cjs ├── prettier.config.cjs ├── public ├── css │ └── tailwind.css └── img │ ├── background-image.png │ ├── bruce-mars.jpeg │ ├── devto.svg │ ├── favicon.png │ ├── github.svg │ ├── home-decor-1.jpeg │ ├── home-decor-2.jpeg │ ├── home-decor-3.jpeg │ ├── home-decor-4.jpeg │ ├── logo-asana.svg │ ├── logo-atlassian.svg │ ├── logo-ct-dark.png │ ├── logo-ct.png │ ├── logo-invision.svg │ ├── logo-jira.svg │ ├── logo-slack.svg │ ├── logo-spotify.svg │ ├── logo-xd.svg │ ├── pattern.png │ ├── team-1.jpeg │ ├── team-2.jpeg │ ├── team-3.jpeg │ ├── team-4.jpeg │ └── twitter-logo.svg ├── src ├── App.jsx ├── configs │ ├── charts-config.js │ └── index.js ├── context │ └── index.jsx ├── data │ ├── authors-table-data.js │ ├── conversations-data.js │ ├── index.js │ ├── orders-overview-data.js │ ├── platform-settings-data.js │ ├── projects-data.js │ ├── projects-table-data.js │ ├── statistics-cards-data.js │ └── statistics-charts-data.js ├── layouts │ ├── auth.jsx │ ├── dashboard.jsx │ └── index.js ├── main.jsx ├── pages │ ├── auth │ │ ├── index.js │ │ ├── sign-in.jsx │ │ └── sign-up.jsx │ └── dashboard │ │ ├── home.jsx │ │ ├── index.js │ │ ├── notifications.jsx │ │ ├── profile.jsx │ │ └── tables.jsx ├── routes.jsx └── widgets │ ├── cards │ ├── index.js │ ├── message-card.jsx │ ├── profile-info-card.jsx │ └── statistics-card.jsx │ ├── charts │ ├── index.js │ └── statistics-chart.jsx │ └── layout │ ├── configurator.jsx │ ├── dashboard-navbar.jsx │ ├── footer.jsx │ ├── index.js │ ├── navbar.jsx │ └── sidenav.jsx ├── tailwind.config.cjs └── vite.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | pnpm-lock.yaml 10 | package-lock.json 11 | yarn.lock 12 | 13 | node_modules 14 | dist 15 | dist-ssr 16 | *.local 17 | 18 | # Editor directories and files 19 | .vscode/* 20 | !.vscode/extensions.json 21 | .idea 22 | .DS_Store 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | ## [2.1.0] 2023-11-14 4 | - Upgrade to Material Tailwind `v2` 5 | 6 | ## [2.0.1] 2023-03-29 7 | 8 | - Add nepcha scripts 9 | 10 | ## [2.0.0] 2022-11-02 11 | 12 | - Update the entire structure 13 | - Migration to vite 14 | - Migration to React 18 15 | - Migration to React Router DOM 6 16 | - Migration to @material-tailwind/react latest version 17 | - Migration from chart.js to apexcharts 18 | - Add global context support 19 | 20 | ## [1.1.0] 2021-06-10 21 | 22 | ### New Features 23 | 24 | - Add the download button 25 | 26 | ### Bug Fixing 27 | 28 | - Fix the dropdown of admin navbar 29 | 30 | ## [1.0.0] 2021-06-08 31 | 32 | ### Original Release 33 | 34 | - Started project from [Material Tailwind Dashboard React](https://www.creative-tim.com/product/material-tailwind-dashboard-react?ref=changelog-mtdr) 35 | - Updated all dependencies from [Material Tailwind Dashboard React](https://www.creative-tim.com/product/material-tailwind-dashboard-react?ref=changelog-mtdr) and those dependencies that were not working with the new React v17+ API, were deleted and/or replaced 36 | 37 | ### Warning 38 | 39 | _Warnings might appear while doing a clean npm install - they do not affect the UI or the functionality of the product, and they appear because of NodeJS and not from the product itself._ 40 | _This product was designed and developed using NodeJS version 14.16.0 LTS, so please make sure to have a compatible version of NodeJS._ 41 | -------------------------------------------------------------------------------- /ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Creative Tim 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | Footer 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # [Material Tailwind Dashboard React](http://demos.creative-tim.com/material-tailwind-dashboard-react/#/?ref=readme-mtdr) [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&logo=twitter)](https://twitter.com/intent/tweet?url=https://www.creative-tim.com/product/material-tailwind-dashboard-react&text=Check%20Material%20Tailwind%20Dashboard%20React%20made%20by%20@CreativeTim%20#webdesign%20#kit%20#materialdesign%20#react%20#materialtailwind%20#tailwindcss%20https://www.creative-tim.com/product/material-tailwind-dashboard-react) 2 | 3 | ![version](https://img.shields.io/badge/version-2.1.0-blue.svg) [![GitHub issues open](https://img.shields.io/github/issues/creativetimofficial/material-tailwind-dashboard-react.svg)](https://github.com/creativetimofficial/material-tailwind-dashboard-react/issues?q=is%3Aopen+is%3Aissue) [![GitHub issues closed](https://img.shields.io/github/issues-closed-raw/creativetimofficial/material-tailwind-dashboard-react.svg)](https://github.com/creativetimofficial/material-tailwind-dashboard-react/issues?q=is%3Aissue+is%3Aclosed) 4 | 5 | ![Image](https://s3.amazonaws.com/creativetim_bucket/products/488/original/material-tailwind-dashboard-react.jpg) 6 | 7 | Material Tailwind Dashboard React is our newest free Material Tailwind Admin Template based on Tailwind CSS and React. If you’re a developer looking to create an admin dashboard that is developer-friendly, rich with features, and highly customisable, here is your match. Our innovative Material Tailwind, Tailwind CSS & React dashboard comes with a beautiful design inspired by Google's Material Design and it will help you create stunning websites & web apps to delight your clients. 8 | 9 | **Fully Coded Elements** 10 | 11 | Material Tailwind Dashboard React is built with over 40 frontend individual elements coming from @material-tailwind/react, like buttons, inputs, navbars, nav tabs, cards, or alerts, giving you the freedom of choosing and combining. All components can take variations in color, which you can easily modify using props and tailwind css classnames. You will save a lot of time going from prototyping to full-functional code because all elements are implemented. 12 | 13 | This free Material Tailwind, Tailwind CSS & React Dashboard is coming with prebuilt design blocks, so the development process is seamless, switching from our pages to the real website is very easy to be done. 14 | 15 | View [all components here](https://www.material-tailwind.com/docs/react/button). 16 | 17 | **Documentation built by Developers** 18 | 19 | Each element is well presented in very complex documentation. 20 | 21 | You can read more about the [documentation here](https://www.material-tailwind.com/docs/react/installation). 22 | 23 | **Example Pages** 24 | 25 | If you want to get inspiration or just show something directly to your clients, you can jump-start your development with our pre-built example pages. You will be able to quickly set up the basic structure for your web project. 26 | 27 | View [example pages here](https://demos.creative-tim.com/material-tailwind-dashboard-react/#/dashboard/home). 28 | 29 | **HELPFUL LINKS** 30 | 31 | - View [Github Repository](https://github.com/creativetimofficial/material-tailwind-dashboard-react) 32 | - Check [FAQ Page](https://www.creative-tim.com/faq) 33 | 34 | #### Special thanks 35 | 36 | During the development of this dashboard, we have used many existing resources from awesome developers. We want to thank them for providing their tools open source: 37 | 38 | - [Material Tailwind](https://material-tailwind.com/) - Material Tailwind is an easy to use components library for Tailwind CSS and Material Design. 39 | - [Hero Icons](https://heroicons.com/) - Beautiful hand-crafted SVG icons. 40 | - [Apex Charts](https://apexcharts.com/) - Modern & Interactive open-source Charts. 41 | - [Nepcha Analytics](https://nepcha.com?ref=readme) for the analytics tool. Nepcha is already integrated with Material Tailwind Dashboard React. You can use it to gain insights into your sources of traffic. 42 | 43 | Let us know your thoughts below. And good luck with development! 44 | 45 | ## Table of Contents 46 | 47 | - [Versions](#versions) 48 | - [Demo](#demo) 49 | - [Quick Start](#quick-start) 50 | - [Deploy](#deploy) 51 | - [Documentation](#documentation) 52 | - [File Structure](#file-structure) 53 | - [Browser Support](#browser-support) 54 | - [Resources](#resources) 55 | - [Reporting Issues](#reporting-issues) 56 | - [Technical Support or Questions](#technical-support-or-questions) 57 | - [Licensing](#licensing) 58 | - [Useful Links](#useful-links) 59 | 60 | ## Versions 61 | 62 | [](https://www.creative-tim.com/product/material-tailwind-dashboard-react?ref=readme-mtdr) 63 | 64 | | React | 65 | | ----- | 66 | 67 | | [![Material Tailwind Dashboard React](https://s3.amazonaws.com/creativetim_bucket/products/488/thumb/material-tailwind-dashboard-react.jpg)](http://demos.creative-tim.com/material-tailwind-dashboard-react/#/?ref=readme-mtdr) 68 | 69 | ## Demo 70 | 71 | - [Dashboard page](https://demos.creative-tim.com/material-tailwind-dashboard-react/#/dashboard/home?ref=readme-mtdr) 72 | - [Profile page](https://demos.creative-tim.com/material-tailwind-dashboard-react/#/dashboard/profile?ref=readme-mtdr) 73 | - [Tables page](https://demos.creative-tim.com/material-tailwind-dashboard-react/#/dashboard/tables?ref=readme-mtdr) 74 | - [Notifications page](https://demos.creative-tim.com/material-tailwind-dashboard-react/#/dashboard/notifications?ref=readme-mtdr) 75 | - [Sign in page](https://demos.creative-tim.com/material-tailwind-dashboard-react/#/auth/sign-in?ref=readme-mtdr) 76 | - [Sign up page](https://demos.creative-tim.com/material-tailwind-dashboard-react/#/auth/sign-up?ref=readme-mtdr) 77 | 78 | [View More](https://demos.creative-tim.com/material-tailwind-dashboard-react/#/?ref=readme-mtdr). 79 | 80 | ## Quick start 81 | 82 | Quick start options: 83 | 84 | - Download from [Creative Tim](https://www.creative-tim.com/product/material-tailwind-dashboard-react?ref=readme-mtdr). 85 | 86 | ## Deploy 87 | 88 | :rocket: You can deploy your own version of the template to Genezio with one click: 89 | 90 | [![Deploy to Genezio](https://raw.githubusercontent.com/Genez-io/graphics/main/svg/deploy-button.svg)](https://app.genez.io/start/deploy?repository=https://github.com/creativetimofficial/material-tailwind-dashboard-react&utm_source=github&utm_medium=referral&utm_campaign=github-creativetim&utm_term=deploy-project&utm_content=button-head) 91 | 92 | ## Terminal Commands 93 | 94 | 1. Download and Install NodeJs LTS version from [NodeJs Official Page](https://nodejs.org/en/download/). 95 | 2. Navigate to the root ./ directory of the product and run `npm install` or `yarn install` or `pnpm install` to install our local dependencies. 96 | 97 | ## Documentation 98 | 99 | The documentation for the Material Tailwind Dashboard React is hosted at our [website](https://material-tailwind.com/?ref=readme-mtdr). 100 | 101 | ### What's included 102 | 103 | Within the download you'll find the following directories and files: 104 | 105 | ``` 106 | material-tailwind-dashboard-react 107 | ├── public 108 | │   ├── css 109 | │   └── img 110 | ├── src 111 | │   ├── configs 112 | │   ├── context 113 | │   ├── data 114 | │   ├── layouts 115 | │   ├── pages 116 | │   ├── widgets 117 | │   ├── App.jsx 118 | │   ├── main.jsx 119 | │   └── routes.jsx 120 | ├── .gitignore 121 | ├── CHANGELOG.md 122 | ├── index.html 123 | ├── ISSUE_TEMPLATE.md 124 | ├── jsconfig.json 125 | ├── LICENSE 126 | ├── package.json 127 | ├── postcsss.config.cjs 128 | ├── prettier.config.cjs 129 | ├── README.md 130 | ├── tailwind.config.cjs 131 | └── vite.config.js 132 | ``` 133 | 134 | ## Browser Support 135 | 136 | At present, we officially aim to support the last two versions of the following browsers: 137 | 138 | 139 | 140 | ## Resources 141 | 142 | - [Live Preview](https://demos.creative-tim.com/material-tailwind-dashboard-react/#/dashboard/home?ref=readme-mtdr) 143 | - [Download Page](https://www.creative-tim.com/product/material-tailwind-dashboard-react?ref=readme-mtdr) 144 | - Documentation is [here](https://material-tailwind.com/?ref=readme-mtdr) 145 | - [License Agreement](https://www.creative-tim.com/license?ref=readme-mtdr) 146 | - [Support](https://www.creative-tim.com/contact-us?ref=readme-mtdr) 147 | - Issues: [Github Issues Page](https://github.com/creativetimofficial/material-tailwind-dashboard-react/issues) 148 | - [Nepcha Analytics](https://nepcha.com?ref=readme) - Analytics tool for your website 149 | 150 | ## Reporting Issues 151 | 152 | We use GitHub Issues as the official bug tracker for the Material Tailwind Dashboard React. Here are some advices for our users that want to report an issue: 153 | 154 | 1. Make sure that you are using the latest version of the Material Tailwind Dashboard React. Check the CHANGELOG from your dashboard on our [website](https://www.creative-tim.com/product/material-tailwind-dashboard-react?ref=readme-mtdr). 155 | 2. Providing us reproducible steps for the issue will shorten the time it takes for it to be fixed. 156 | 3. Some issues may be browser specific, so specifying in what browser you encountered the issue might help. 157 | 158 | ## Technical Support or Questions 159 | 160 | If you have questions or need help integrating the product please [contact us](https://www.creative-tim.com/contact-us?ref=readme-mtdr) instead of opening an issue. 161 | 162 | ## Licensing 163 | 164 | - Copyright 2023 [Creative Tim](https://www.creative-tim.com?ref=readme-mtdr) 165 | - Creative Tim [license](https://www.creative-tim.com/license?ref=readme-mtdr) 166 | 167 | ## Useful Links 168 | 169 | - [More products](https://www.creative-tim.com/templates?ref=readme-mtdr) from Creative Tim 170 | 171 | - [Tutorials](https://www.youtube.com/channel/UCVyTG4sCw-rOvB9oHkzZD1w) 172 | 173 | - [Freebies](https://www.creative-tim.com/bootstrap-themes/free?ref=readme-mtdr) from Creative Tim 174 | 175 | - [Affiliate Program](https://www.creative-tim.com/affiliates/new?ref=readme-mtdr) (earn money) 176 | 177 | ##### Social Media 178 | 179 | Twitter: 180 | 181 | Facebook: 182 | 183 | Dribbble: 184 | 185 | Google+: 186 | 187 | Instagram: 188 | -------------------------------------------------------------------------------- /genezio.yaml: -------------------------------------------------------------------------------- 1 | name: material-tailwind-dashboard-react 2 | region: us-east-1 3 | frontend: 4 | # Specifies the path of your code. 5 | path: . 6 | # Specifies the folder where the build is located. 7 | # This is the folder that will be deployed. 8 | publish: dist 9 | # Scripts will run in the specified `path` folder. 10 | scripts: 11 | # The command to build your frontend project. This is custom to your project. 12 | # It must to populate the specified `publish` folder with a `index.html` file. 13 | deploy: 14 | - npm install --legacy-peer-deps 15 | - npm run build 16 | yamlVersion: 2 -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | Material Tailwind Dashboard React | By Creative Tim 19 | 23 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |
38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": ".", 4 | "paths": { 5 | "@/*": ["src/*"], 6 | }, 7 | }, 8 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "material-tailwind-dashboard-react", 3 | "private": true, 4 | "version": "2.1.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "preview": "vite preview" 10 | }, 11 | "dependencies": { 12 | "@heroicons/react": "2.0.18", 13 | "@material-tailwind/react": "2.1.4", 14 | "apexcharts": "3.44.0", 15 | "prop-types": "15.8.1", 16 | "react": "18.2.0", 17 | "react-apexcharts": "1.4.1", 18 | "react-dom": "18.2.0", 19 | "react-router-dom": "6.17.0" 20 | }, 21 | "devDependencies": { 22 | "@types/react": "18.2.31", 23 | "@types/react-dom": "18.2.14", 24 | "@vitejs/plugin-react": "4.1.0", 25 | "autoprefixer": "10.4.16", 26 | "postcss": "8.4.31", 27 | "prettier": "3.0.3", 28 | "prettier-plugin-tailwindcss": "0.5.6", 29 | "tailwindcss": "3.3.4", 30 | "vite": "4.5.0" 31 | } 32 | } -------------------------------------------------------------------------------- /postcss.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /prettier.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | tailwindConfig: "./tailwind.config.cjs", 3 | plugins: [require("prettier-plugin-tailwindcss")], 4 | }; 5 | -------------------------------------------------------------------------------- /public/css/tailwind.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /public/img/background-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-tailwind-dashboard-react/721f312c444ee7caa300963a042915c6bdcc883b/public/img/background-image.png -------------------------------------------------------------------------------- /public/img/bruce-mars.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-tailwind-dashboard-react/721f312c444ee7caa300963a042915c6bdcc883b/public/img/bruce-mars.jpeg -------------------------------------------------------------------------------- /public/img/devto.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | devto 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /public/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-tailwind-dashboard-react/721f312c444ee7caa300963a042915c6bdcc883b/public/img/favicon.png -------------------------------------------------------------------------------- /public/img/github.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | github 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /public/img/home-decor-1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-tailwind-dashboard-react/721f312c444ee7caa300963a042915c6bdcc883b/public/img/home-decor-1.jpeg -------------------------------------------------------------------------------- /public/img/home-decor-2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-tailwind-dashboard-react/721f312c444ee7caa300963a042915c6bdcc883b/public/img/home-decor-2.jpeg -------------------------------------------------------------------------------- /public/img/home-decor-3.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-tailwind-dashboard-react/721f312c444ee7caa300963a042915c6bdcc883b/public/img/home-decor-3.jpeg -------------------------------------------------------------------------------- /public/img/home-decor-4.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-tailwind-dashboard-react/721f312c444ee7caa300963a042915c6bdcc883b/public/img/home-decor-4.jpeg -------------------------------------------------------------------------------- /public/img/logo-asana.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Logos 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /public/img/logo-atlassian.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Logos 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /public/img/logo-ct-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-tailwind-dashboard-react/721f312c444ee7caa300963a042915c6bdcc883b/public/img/logo-ct-dark.png -------------------------------------------------------------------------------- /public/img/logo-ct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-tailwind-dashboard-react/721f312c444ee7caa300963a042915c6bdcc883b/public/img/logo-ct.png -------------------------------------------------------------------------------- /public/img/logo-invision.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Logos 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /public/img/logo-jira.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Logos 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /public/img/logo-slack.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Logos 4 | 5 | 11 | 12 | -------------------------------------------------------------------------------- /public/img/logo-spotify.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Logos 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /public/img/logo-xd.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Logos 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /public/img/pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-tailwind-dashboard-react/721f312c444ee7caa300963a042915c6bdcc883b/public/img/pattern.png -------------------------------------------------------------------------------- /public/img/team-1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-tailwind-dashboard-react/721f312c444ee7caa300963a042915c6bdcc883b/public/img/team-1.jpeg -------------------------------------------------------------------------------- /public/img/team-2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-tailwind-dashboard-react/721f312c444ee7caa300963a042915c6bdcc883b/public/img/team-2.jpeg -------------------------------------------------------------------------------- /public/img/team-3.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-tailwind-dashboard-react/721f312c444ee7caa300963a042915c6bdcc883b/public/img/team-3.jpeg -------------------------------------------------------------------------------- /public/img/team-4.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/material-tailwind-dashboard-react/721f312c444ee7caa300963a042915c6bdcc883b/public/img/team-4.jpeg -------------------------------------------------------------------------------- /public/img/twitter-logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/App.jsx: -------------------------------------------------------------------------------- 1 | import { Routes, Route, Navigate } from "react-router-dom"; 2 | import { Dashboard, Auth } from "@/layouts"; 3 | 4 | function App() { 5 | return ( 6 | 7 | } /> 8 | } /> 9 | } /> 10 | 11 | ); 12 | } 13 | 14 | export default App; 15 | -------------------------------------------------------------------------------- /src/configs/charts-config.js: -------------------------------------------------------------------------------- 1 | export const chartsConfig = { 2 | chart: { 3 | toolbar: { 4 | show: false, 5 | }, 6 | }, 7 | title: { 8 | show: "", 9 | }, 10 | dataLabels: { 11 | enabled: false, 12 | }, 13 | xaxis: { 14 | axisTicks: { 15 | show: false, 16 | }, 17 | axisBorder: { 18 | show: false, 19 | }, 20 | labels: { 21 | style: { 22 | colors: "#37474f", 23 | fontSize: "13px", 24 | fontFamily: "inherit", 25 | fontWeight: 300, 26 | }, 27 | }, 28 | }, 29 | yaxis: { 30 | labels: { 31 | style: { 32 | colors: "#37474f", 33 | fontSize: "13px", 34 | fontFamily: "inherit", 35 | fontWeight: 300, 36 | }, 37 | }, 38 | }, 39 | grid: { 40 | show: true, 41 | borderColor: "#dddddd", 42 | strokeDashArray: 5, 43 | xaxis: { 44 | lines: { 45 | show: true, 46 | }, 47 | }, 48 | padding: { 49 | top: 5, 50 | right: 20, 51 | }, 52 | }, 53 | fill: { 54 | opacity: 0.8, 55 | }, 56 | tooltip: { 57 | theme: "dark", 58 | }, 59 | }; 60 | 61 | export default chartsConfig; 62 | -------------------------------------------------------------------------------- /src/configs/index.js: -------------------------------------------------------------------------------- 1 | export * from "@/configs/charts-config"; 2 | -------------------------------------------------------------------------------- /src/context/index.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import PropTypes from "prop-types"; 3 | 4 | export const MaterialTailwind = React.createContext(null); 5 | MaterialTailwind.displayName = "MaterialTailwindContext"; 6 | 7 | export function reducer(state, action) { 8 | switch (action.type) { 9 | case "OPEN_SIDENAV": { 10 | return { ...state, openSidenav: action.value }; 11 | } 12 | case "SIDENAV_TYPE": { 13 | return { ...state, sidenavType: action.value }; 14 | } 15 | case "SIDENAV_COLOR": { 16 | return { ...state, sidenavColor: action.value }; 17 | } 18 | case "TRANSPARENT_NAVBAR": { 19 | return { ...state, transparentNavbar: action.value }; 20 | } 21 | case "FIXED_NAVBAR": { 22 | return { ...state, fixedNavbar: action.value }; 23 | } 24 | case "OPEN_CONFIGURATOR": { 25 | return { ...state, openConfigurator: action.value }; 26 | } 27 | default: { 28 | throw new Error(`Unhandled action type: ${action.type}`); 29 | } 30 | } 31 | } 32 | 33 | export function MaterialTailwindControllerProvider({ children }) { 34 | const initialState = { 35 | openSidenav: false, 36 | sidenavColor: "dark", 37 | sidenavType: "white", 38 | transparentNavbar: true, 39 | fixedNavbar: false, 40 | openConfigurator: false, 41 | }; 42 | 43 | const [controller, dispatch] = React.useReducer(reducer, initialState); 44 | const value = React.useMemo( 45 | () => [controller, dispatch], 46 | [controller, dispatch] 47 | ); 48 | 49 | return ( 50 | 51 | {children} 52 | 53 | ); 54 | } 55 | 56 | export function useMaterialTailwindController() { 57 | const context = React.useContext(MaterialTailwind); 58 | 59 | if (!context) { 60 | throw new Error( 61 | "useMaterialTailwindController should be used inside the MaterialTailwindControllerProvider." 62 | ); 63 | } 64 | 65 | return context; 66 | } 67 | 68 | MaterialTailwindControllerProvider.displayName = "/src/context/index.jsx"; 69 | 70 | MaterialTailwindControllerProvider.propTypes = { 71 | children: PropTypes.node.isRequired, 72 | }; 73 | 74 | export const setOpenSidenav = (dispatch, value) => 75 | dispatch({ type: "OPEN_SIDENAV", value }); 76 | export const setSidenavType = (dispatch, value) => 77 | dispatch({ type: "SIDENAV_TYPE", value }); 78 | export const setSidenavColor = (dispatch, value) => 79 | dispatch({ type: "SIDENAV_COLOR", value }); 80 | export const setTransparentNavbar = (dispatch, value) => 81 | dispatch({ type: "TRANSPARENT_NAVBAR", value }); 82 | export const setFixedNavbar = (dispatch, value) => 83 | dispatch({ type: "FIXED_NAVBAR", value }); 84 | export const setOpenConfigurator = (dispatch, value) => 85 | dispatch({ type: "OPEN_CONFIGURATOR", value }); 86 | -------------------------------------------------------------------------------- /src/data/authors-table-data.js: -------------------------------------------------------------------------------- 1 | export const authorsTableData = [ 2 | { 3 | img: "/img/team-2.jpeg", 4 | name: "John Michael", 5 | email: "john@creative-tim.com", 6 | job: ["Manager", "Organization"], 7 | online: true, 8 | date: "23/04/18", 9 | }, 10 | { 11 | img: "/img/team-1.jpeg", 12 | name: "Alexa Liras", 13 | email: "alexa@creative-tim.com", 14 | job: ["Programator", "Developer"], 15 | online: false, 16 | date: "11/01/19", 17 | }, 18 | { 19 | img: "/img/team-4.jpeg", 20 | name: "Laurent Perrier", 21 | email: "laurent@creative-tim.com", 22 | job: ["Executive", "Projects"], 23 | online: true, 24 | date: "19/09/17", 25 | }, 26 | { 27 | img: "/img/team-3.jpeg", 28 | name: "Michael Levi", 29 | email: "michael@creative-tim.com", 30 | job: ["Programator", "Developer"], 31 | online: true, 32 | date: "24/12/08", 33 | }, 34 | { 35 | img: "/img/bruce-mars.jpeg", 36 | name: "Bruce Mars", 37 | email: "bruce@creative-tim.com", 38 | job: ["Manager", "Executive"], 39 | online: false, 40 | date: "04/10/21", 41 | }, 42 | { 43 | img: "/img/team-2.jpeg", 44 | name: "Alexander", 45 | email: "alexander@creative-tim.com", 46 | job: ["Programator", "Developer"], 47 | online: false, 48 | date: "14/09/20", 49 | }, 50 | ]; 51 | 52 | export default authorsTableData; 53 | -------------------------------------------------------------------------------- /src/data/conversations-data.js: -------------------------------------------------------------------------------- 1 | export const conversationsData = [ 2 | { 3 | img: "/img/team-1.jpeg", 4 | name: "Sophie B.", 5 | message: "Hi! I need more information...", 6 | }, 7 | { 8 | img: "/img/team-2.jpeg", 9 | name: "Alexander", 10 | message: "Awesome work, can you...", 11 | }, 12 | { 13 | img: "/img/team-3.jpeg", 14 | name: "Ivanna", 15 | message: "About files I can...", 16 | }, 17 | { 18 | img: "/img/team-4.jpeg", 19 | name: "Peterson", 20 | message: "Have a great afternoon...", 21 | }, 22 | { 23 | img: "/img/bruce-mars.jpeg", 24 | name: "Bruce Mars", 25 | message: "Hi! I need more information...", 26 | }, 27 | ]; 28 | 29 | export default conversationsData; 30 | -------------------------------------------------------------------------------- /src/data/index.js: -------------------------------------------------------------------------------- 1 | export * from "@/data/statistics-cards-data"; 2 | export * from "@/data/statistics-charts-data"; 3 | export * from "@/data/projects-table-data"; 4 | export * from "@/data/orders-overview-data"; 5 | export * from "@/data/platform-settings-data"; 6 | export * from "@/data/conversations-data"; 7 | export * from "@/data/projects-data"; 8 | export * from "@/data/authors-table-data"; 9 | -------------------------------------------------------------------------------- /src/data/orders-overview-data.js: -------------------------------------------------------------------------------- 1 | import { 2 | BellIcon, 3 | PlusCircleIcon, 4 | ShoppingCartIcon, 5 | CreditCardIcon, 6 | LockOpenIcon, 7 | BanknotesIcon, 8 | } from "@heroicons/react/24/solid"; 9 | 10 | export const ordersOverviewData = [ 11 | { 12 | icon: BellIcon, 13 | color: "text-blue-gray-300", 14 | title: "$2400, Design changes", 15 | description: "22 DEC 7:20 PM", 16 | }, 17 | { 18 | icon: PlusCircleIcon, 19 | color: "text-blue-gray-300", 20 | title: "New order #1832412", 21 | description: "21 DEC 11 PM", 22 | }, 23 | { 24 | icon: ShoppingCartIcon, 25 | color: "text-blue-gray-300", 26 | title: "Server payments for April", 27 | description: "21 DEC 9:34 PM", 28 | }, 29 | { 30 | icon: CreditCardIcon, 31 | color: "text-blue-gray-300", 32 | title: "New card added for order #4395133", 33 | description: "20 DEC 2:20 AM", 34 | }, 35 | { 36 | icon: LockOpenIcon, 37 | color: "text-blue-gray-300", 38 | title: "Unlock packages for development", 39 | description: "18 DEC 4:54 AM", 40 | }, 41 | { 42 | icon: BanknotesIcon, 43 | color: "text-blue-gray-300", 44 | title: "New order #9583120", 45 | description: "17 DEC", 46 | }, 47 | ]; 48 | 49 | export default ordersOverviewData; 50 | -------------------------------------------------------------------------------- /src/data/platform-settings-data.js: -------------------------------------------------------------------------------- 1 | export const platformSettingsData = [ 2 | { 3 | title: "account", 4 | options: [ 5 | { 6 | checked: true, 7 | label: "Email me when someone follows me", 8 | }, 9 | { 10 | checked: false, 11 | label: "Email me when someone answers on my post", 12 | }, 13 | { 14 | checked: true, 15 | label: "Email me when someone mentions me", 16 | }, 17 | ], 18 | }, 19 | { 20 | title: "application", 21 | options: [ 22 | { 23 | checked: false, 24 | label: "New launches and projects", 25 | }, 26 | { 27 | checked: true, 28 | label: "Monthly product updates", 29 | }, 30 | { 31 | checked: false, 32 | label: "Subscribe to newsletter", 33 | }, 34 | ], 35 | }, 36 | ]; 37 | 38 | export default platformSettingsData; 39 | -------------------------------------------------------------------------------- /src/data/projects-data.js: -------------------------------------------------------------------------------- 1 | export const projectsData = [ 2 | { 3 | img: "/img/home-decor-1.jpeg", 4 | title: "Modern", 5 | tag: "Project #1", 6 | description: 7 | "As Uber works through a huge amount of internal management turmoil.", 8 | route: "/dashboard/profile", 9 | members: [ 10 | { img: "/img/team-1.jpeg", name: "Romina Hadid" }, 11 | { img: "/img/team-2.jpeg", name: "Ryan Tompson" }, 12 | { img: "/img/team-3.jpeg", name: "Jessica Doe" }, 13 | { img: "/img/team-4.jpeg", name: "Alexander Smith" }, 14 | ], 15 | }, 16 | { 17 | img: "/img/home-decor-2.jpeg", 18 | title: "Scandinavian", 19 | tag: "Project #2", 20 | description: 21 | "Music is something that every person has his or her own specific opinion about.", 22 | route: "/dashboard/profile", 23 | members: [ 24 | { img: "/img/team-4.jpeg", name: "Alexander Smith" }, 25 | { img: "/img/team-3.jpeg", name: "Jessica Doe" }, 26 | { img: "/img/team-2.jpeg", name: "Ryan Tompson" }, 27 | { img: "/img/team-1.jpeg", name: "Romina Hadid" }, 28 | ], 29 | }, 30 | { 31 | img: "/img/home-decor-3.jpeg", 32 | title: "Minimalist", 33 | tag: "Project #3", 34 | description: 35 | "Different people have different taste, and various types of music.", 36 | route: "/dashboard/profile", 37 | members: [ 38 | { img: "/img/team-1.jpeg", name: "Romina Hadid" }, 39 | { img: "/img/team-2.jpeg", name: "Ryan Tompson" }, 40 | { img: "/img/team-3.jpeg", name: "Jessica Doe" }, 41 | { img: "/img/team-4.jpeg", name: "Alexander Smith" }, 42 | ], 43 | }, 44 | { 45 | img: "/img/home-decor-4.jpeg", 46 | title: "Gothic", 47 | tag: "Project #4", 48 | description: 49 | "Why would anyone pick blue over pink? Pink is obviously a better color.", 50 | route: "/dashboard/profile", 51 | members: [ 52 | { img: "/img/team-4.jpeg", name: "Alexander Smith" }, 53 | { img: "/img/team-3.jpeg", name: "Jessica Doe" }, 54 | { img: "/img/team-2.jpeg", name: "Ryan Tompson" }, 55 | { img: "/img/team-1.jpeg", name: "Romina Hadid" }, 56 | ], 57 | }, 58 | ]; 59 | 60 | export default projectsData; 61 | -------------------------------------------------------------------------------- /src/data/projects-table-data.js: -------------------------------------------------------------------------------- 1 | export const projectsTableData = [ 2 | { 3 | img: "/img/logo-xd.svg", 4 | name: "Material XD Version", 5 | members: [ 6 | { img: "/img/team-1.jpeg", name: "Romina Hadid" }, 7 | { img: "/img/team-2.jpeg", name: "Ryan Tompson" }, 8 | { img: "/img/team-3.jpeg", name: "Jessica Doe" }, 9 | { img: "/img/team-4.jpeg", name: "Alexander Smith" }, 10 | ], 11 | budget: "$14,000", 12 | completion: 60, 13 | }, 14 | { 15 | img: "/img/logo-atlassian.svg", 16 | name: "Add Progress Track", 17 | members: [ 18 | { img: "/img/team-2.jpeg", name: "Ryan Tompson" }, 19 | { img: "/img/team-4.jpeg", name: "Alexander Smith" }, 20 | ], 21 | budget: "$3,000", 22 | completion: 10, 23 | }, 24 | { 25 | img: "/img/logo-slack.svg", 26 | name: "Fix Platform Errors", 27 | members: [ 28 | { img: "/img/team-3.jpeg", name: "Jessica Doe" }, 29 | { img: "/img/team-1.jpeg", name: "Romina Hadid" }, 30 | ], 31 | budget: "Not set", 32 | completion: 100, 33 | }, 34 | { 35 | img: "/img/logo-spotify.svg", 36 | name: "Launch our Mobile App", 37 | members: [ 38 | { img: "/img/team-4.jpeg", name: "Alexander Smith" }, 39 | { img: "/img/team-3.jpeg", name: "Jessica Doe" }, 40 | { img: "/img/team-2.jpeg", name: "Ryan Tompson" }, 41 | { img: "/img/team-1.jpeg", name: "Romina Hadid" }, 42 | ], 43 | budget: "$20,500", 44 | completion: 100, 45 | }, 46 | { 47 | img: "/img/logo-jira.svg", 48 | name: "Add the New Pricing Page", 49 | members: [{ img: "/img/team-4.jpeg", name: "Alexander Smith" }], 50 | budget: "$500", 51 | completion: 25, 52 | }, 53 | { 54 | img: "/img/logo-invision.svg", 55 | name: "Redesign New Online Shop", 56 | members: [ 57 | { img: "/img/team-1.jpeg", name: "Romina Hadid" }, 58 | { img: "/img/team-4.jpeg", name: "Alexander Smith" }, 59 | ], 60 | budget: "$2,000", 61 | completion: 40, 62 | }, 63 | ]; 64 | 65 | export default projectsTableData; 66 | -------------------------------------------------------------------------------- /src/data/statistics-cards-data.js: -------------------------------------------------------------------------------- 1 | import { 2 | BanknotesIcon, 3 | UserPlusIcon, 4 | UsersIcon, 5 | ChartBarIcon, 6 | } from "@heroicons/react/24/solid"; 7 | 8 | export const statisticsCardsData = [ 9 | { 10 | color: "gray", 11 | icon: BanknotesIcon, 12 | title: "Today's Money", 13 | value: "$53k", 14 | footer: { 15 | color: "text-green-500", 16 | value: "+55%", 17 | label: "than last week", 18 | }, 19 | }, 20 | { 21 | color: "gray", 22 | icon: UsersIcon, 23 | title: "Today's Users", 24 | value: "2,300", 25 | footer: { 26 | color: "text-green-500", 27 | value: "+3%", 28 | label: "than last month", 29 | }, 30 | }, 31 | { 32 | color: "gray", 33 | icon: UserPlusIcon, 34 | title: "New Clients", 35 | value: "3,462", 36 | footer: { 37 | color: "text-red-500", 38 | value: "-2%", 39 | label: "than yesterday", 40 | }, 41 | }, 42 | { 43 | color: "gray", 44 | icon: ChartBarIcon, 45 | title: "Sales", 46 | value: "$103,430", 47 | footer: { 48 | color: "text-green-500", 49 | value: "+5%", 50 | label: "than yesterday", 51 | }, 52 | }, 53 | ]; 54 | 55 | export default statisticsCardsData; 56 | -------------------------------------------------------------------------------- /src/data/statistics-charts-data.js: -------------------------------------------------------------------------------- 1 | import { chartsConfig } from "@/configs"; 2 | 3 | const websiteViewsChart = { 4 | type: "bar", 5 | height: 220, 6 | series: [ 7 | { 8 | name: "Views", 9 | data: [50, 20, 10, 22, 50, 10, 40], 10 | }, 11 | ], 12 | options: { 13 | ...chartsConfig, 14 | colors: "#388e3c", 15 | plotOptions: { 16 | bar: { 17 | columnWidth: "16%", 18 | borderRadius: 5, 19 | }, 20 | }, 21 | xaxis: { 22 | ...chartsConfig.xaxis, 23 | categories: ["M", "T", "W", "T", "F", "S", "S"], 24 | }, 25 | }, 26 | }; 27 | 28 | const dailySalesChart = { 29 | type: "line", 30 | height: 220, 31 | series: [ 32 | { 33 | name: "Sales", 34 | data: [50, 40, 300, 320, 500, 350, 200, 230, 500], 35 | }, 36 | ], 37 | options: { 38 | ...chartsConfig, 39 | colors: ["#0288d1"], 40 | stroke: { 41 | lineCap: "round", 42 | }, 43 | markers: { 44 | size: 5, 45 | }, 46 | xaxis: { 47 | ...chartsConfig.xaxis, 48 | categories: [ 49 | "Apr", 50 | "May", 51 | "Jun", 52 | "Jul", 53 | "Aug", 54 | "Sep", 55 | "Oct", 56 | "Nov", 57 | "Dec", 58 | ], 59 | }, 60 | }, 61 | }; 62 | 63 | const completedTaskChart = { 64 | type: "line", 65 | height: 220, 66 | series: [ 67 | { 68 | name: "Sales", 69 | data: [50, 40, 300, 320, 500, 350, 200, 230, 500], 70 | }, 71 | ], 72 | options: { 73 | ...chartsConfig, 74 | colors: ["#388e3c"], 75 | stroke: { 76 | lineCap: "round", 77 | }, 78 | markers: { 79 | size: 5, 80 | }, 81 | xaxis: { 82 | ...chartsConfig.xaxis, 83 | categories: [ 84 | "Apr", 85 | "May", 86 | "Jun", 87 | "Jul", 88 | "Aug", 89 | "Sep", 90 | "Oct", 91 | "Nov", 92 | "Dec", 93 | ], 94 | }, 95 | }, 96 | }; 97 | const completedTasksChart = { 98 | ...completedTaskChart, 99 | series: [ 100 | { 101 | name: "Tasks", 102 | data: [50, 40, 300, 220, 500, 250, 400, 230, 500], 103 | }, 104 | ], 105 | }; 106 | 107 | export const statisticsChartsData = [ 108 | { 109 | color: "white", 110 | title: "Website View", 111 | description: "Last Campaign Performance", 112 | footer: "campaign sent 2 days ago", 113 | chart: websiteViewsChart, 114 | }, 115 | { 116 | color: "white", 117 | title: "Daily Sales", 118 | description: "15% increase in today sales", 119 | footer: "updated 4 min ago", 120 | chart: dailySalesChart, 121 | }, 122 | { 123 | color: "white", 124 | title: "Completed Tasks", 125 | description: "Last Campaign Performance", 126 | footer: "just updated", 127 | chart: completedTasksChart, 128 | }, 129 | ]; 130 | 131 | export default statisticsChartsData; 132 | -------------------------------------------------------------------------------- /src/layouts/auth.jsx: -------------------------------------------------------------------------------- 1 | import { Routes, Route } from "react-router-dom"; 2 | import { 3 | ChartPieIcon, 4 | UserIcon, 5 | UserPlusIcon, 6 | ArrowRightOnRectangleIcon, 7 | } from "@heroicons/react/24/solid"; 8 | import { Navbar, Footer } from "@/widgets/layout"; 9 | import routes from "@/routes"; 10 | 11 | export function Auth() { 12 | const navbarRoutes = [ 13 | { 14 | name: "dashboard", 15 | path: "/dashboard/home", 16 | icon: ChartPieIcon, 17 | }, 18 | { 19 | name: "profile", 20 | path: "/dashboard/home", 21 | icon: UserIcon, 22 | }, 23 | { 24 | name: "sign up", 25 | path: "/auth/sign-up", 26 | icon: UserPlusIcon, 27 | }, 28 | { 29 | name: "sign in", 30 | path: "/auth/sign-in", 31 | icon: ArrowRightOnRectangleIcon, 32 | }, 33 | ]; 34 | 35 | return ( 36 |
37 | 38 | {routes.map( 39 | ({ layout, pages }) => 40 | layout === "auth" && 41 | pages.map(({ path, element }) => ( 42 | 43 | )) 44 | )} 45 | 46 |
47 | ); 48 | } 49 | 50 | Auth.displayName = "/src/layout/Auth.jsx"; 51 | 52 | export default Auth; 53 | -------------------------------------------------------------------------------- /src/layouts/dashboard.jsx: -------------------------------------------------------------------------------- 1 | import { Routes, Route } from "react-router-dom"; 2 | import { Cog6ToothIcon } from "@heroicons/react/24/solid"; 3 | import { IconButton } from "@material-tailwind/react"; 4 | import { 5 | Sidenav, 6 | DashboardNavbar, 7 | Configurator, 8 | Footer, 9 | } from "@/widgets/layout"; 10 | import routes from "@/routes"; 11 | import { useMaterialTailwindController, setOpenConfigurator } from "@/context"; 12 | 13 | export function Dashboard() { 14 | const [controller, dispatch] = useMaterialTailwindController(); 15 | const { sidenavType } = controller; 16 | 17 | return ( 18 |
19 | 25 |
26 | 27 | 28 | setOpenConfigurator(dispatch, true)} 34 | > 35 | 36 | 37 | 38 | {routes.map( 39 | ({ layout, pages }) => 40 | layout === "dashboard" && 41 | pages.map(({ path, element }) => ( 42 | 43 | )) 44 | )} 45 | 46 |
47 |
48 |
49 |
50 |
51 | ); 52 | } 53 | 54 | Dashboard.displayName = "/src/layout/dashboard.jsx"; 55 | 56 | export default Dashboard; 57 | -------------------------------------------------------------------------------- /src/layouts/index.js: -------------------------------------------------------------------------------- 1 | export * from "@/layouts/dashboard"; 2 | export * from "@/layouts/auth"; 3 | -------------------------------------------------------------------------------- /src/main.jsx: -------------------------------------------------------------------------------- 1 | /** 2 | ========================================================= 3 | * Material Tailwind Dashboard React - v2.1.0 4 | ========================================================= 5 | * Product Page: https://www.creative-tim.com/product/material-tailwind-dashboard-react 6 | * Copyright 2023 Creative Tim (https://www.creative-tim.com) 7 | * Licensed under MIT (https://github.com/creativetimofficial/material-tailwind-dashboard-react/blob/main/LICENSE.md) 8 | * Coded by Creative Tim 9 | ========================================================= 10 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | */ 12 | import React from "react"; 13 | import ReactDOM from "react-dom/client"; 14 | import App from "./App"; 15 | import { BrowserRouter } from "react-router-dom"; 16 | import { ThemeProvider } from "@material-tailwind/react"; 17 | import { MaterialTailwindControllerProvider } from "@/context"; 18 | import "../public/css/tailwind.css"; 19 | 20 | ReactDOM.createRoot(document.getElementById("root")).render( 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | ); 31 | -------------------------------------------------------------------------------- /src/pages/auth/index.js: -------------------------------------------------------------------------------- 1 | export * from "@/pages/auth/sign-in"; 2 | export * from "@/pages/auth/sign-up"; 3 | -------------------------------------------------------------------------------- /src/pages/auth/sign-in.jsx: -------------------------------------------------------------------------------- 1 | import { 2 | Card, 3 | Input, 4 | Checkbox, 5 | Button, 6 | Typography, 7 | } from "@material-tailwind/react"; 8 | import { Link } from "react-router-dom"; 9 | 10 | 11 | export function SignIn() { 12 | return ( 13 |
14 |
15 |
16 | Sign In 17 | Enter your email and password to Sign In. 18 |
19 |
20 |
21 | 22 | Your email 23 | 24 | 32 | 33 | Password 34 | 35 | 44 |
45 | 52 | I agree the  53 | 57 | Terms and Conditions 58 | 59 | 60 | } 61 | containerProps={{ className: "-ml-2.5" }} 62 | /> 63 | 66 | 67 |
68 | 75 | Subscribe me to newsletter 76 | 77 | } 78 | containerProps={{ className: "-ml-2.5" }} 79 | /> 80 | 81 | 82 | Forgot Password 83 | 84 | 85 |
86 |
87 | 103 | 107 |
108 | 109 | Not registered? 110 | Create account 111 | 112 | 113 | 114 |
115 |
116 | 120 |
121 | 122 |
123 | ); 124 | } 125 | 126 | export default SignIn; 127 | -------------------------------------------------------------------------------- /src/pages/auth/sign-up.jsx: -------------------------------------------------------------------------------- 1 | import { 2 | Card, 3 | Input, 4 | Checkbox, 5 | Button, 6 | Typography, 7 | } from "@material-tailwind/react"; 8 | import { Link } from "react-router-dom"; 9 | 10 | 11 | export function SignUp() { 12 | return ( 13 |
14 |
15 | 19 |
20 |
21 |
22 | Join Us Today 23 | Enter your email and password to register. 24 |
25 |
26 |
27 | 28 | Your email 29 | 30 | 38 |
39 | 46 | I agree the  47 | 51 | Terms and Conditions 52 | 53 | 54 | } 55 | containerProps={{ className: "-ml-2.5" }} 56 | /> 57 | 60 | 61 |
62 | 78 | 82 |
83 | 84 | Already have an account? 85 | Sign in 86 | 87 | 88 | 89 |
90 |
91 | ); 92 | } 93 | 94 | export default SignUp; 95 | -------------------------------------------------------------------------------- /src/pages/dashboard/home.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { 3 | Typography, 4 | Card, 5 | CardHeader, 6 | CardBody, 7 | IconButton, 8 | Menu, 9 | MenuHandler, 10 | MenuList, 11 | MenuItem, 12 | Avatar, 13 | Tooltip, 14 | Progress, 15 | } from "@material-tailwind/react"; 16 | import { 17 | EllipsisVerticalIcon, 18 | ArrowUpIcon, 19 | } from "@heroicons/react/24/outline"; 20 | import { StatisticsCard } from "@/widgets/cards"; 21 | import { StatisticsChart } from "@/widgets/charts"; 22 | import { 23 | statisticsCardsData, 24 | statisticsChartsData, 25 | projectsTableData, 26 | ordersOverviewData, 27 | } from "@/data"; 28 | import { CheckCircleIcon, ClockIcon } from "@heroicons/react/24/solid"; 29 | 30 | export function Home() { 31 | return ( 32 |
33 |
34 | {statisticsCardsData.map(({ icon, title, footer, ...rest }) => ( 35 | 44 | {footer.value} 45 |  {footer.label} 46 | 47 | } 48 | /> 49 | ))} 50 |
51 |
52 | {statisticsChartsData.map((props) => ( 53 | 61 | 62 |  {props.footer} 63 | 64 | } 65 | /> 66 | ))} 67 |
68 |
69 | 70 | 76 |
77 | 78 | Projects 79 | 80 | 84 | 85 | 30 done this month 86 | 87 |
88 | 89 | 90 | 91 | 96 | 97 | 98 | 99 | Action 100 | Another Action 101 | Something else here 102 | 103 | 104 |
105 | 106 | 107 | 108 | 109 | {["companies", "members", "budget", "completion"].map( 110 | (el) => ( 111 | 122 | ) 123 | )} 124 | 125 | 126 | 127 | {projectsTableData.map( 128 | ({ img, name, members, budget, completion }, key) => { 129 | const className = `py-3 px-5 ${ 130 | key === projectsTableData.length - 1 131 | ? "" 132 | : "border-b border-blue-gray-50" 133 | }`; 134 | 135 | return ( 136 | 137 | 149 | 164 | 172 | 188 | 189 | ); 190 | } 191 | )} 192 | 193 |
115 | 119 | {el} 120 | 121 |
138 |
139 | 140 | 145 | {name} 146 | 147 |
148 |
150 | {members.map(({ img, name }, key) => ( 151 | 152 | 161 | 162 | ))} 163 | 165 | 169 | {budget} 170 | 171 | 173 |
174 | 178 | {completion}% 179 | 180 | 186 |
187 |
194 |
195 |
196 | 197 | 203 | 204 | Orders Overview 205 | 206 | 210 | 214 | 24% this month 215 | 216 | 217 | 218 | {ordersOverviewData.map( 219 | ({ icon, color, title, description }, key) => ( 220 |
221 |
228 | {React.createElement(icon, { 229 | className: `!w-5 !h-5 ${color}`, 230 | })} 231 |
232 |
233 | 238 | {title} 239 | 240 | 245 | {description} 246 | 247 |
248 |
249 | ) 250 | )} 251 |
252 |
253 |
254 |
255 | ); 256 | } 257 | 258 | export default Home; 259 | -------------------------------------------------------------------------------- /src/pages/dashboard/index.js: -------------------------------------------------------------------------------- 1 | export * from "@/pages/dashboard/home"; 2 | export * from "@/pages/dashboard/profile"; 3 | export * from "@/pages/dashboard/tables"; 4 | export * from "@/pages/dashboard/notifications"; 5 | -------------------------------------------------------------------------------- /src/pages/dashboard/notifications.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { 3 | Typography, 4 | Alert, 5 | Card, 6 | CardHeader, 7 | CardBody, 8 | } from "@material-tailwind/react"; 9 | import { InformationCircleIcon } from "@heroicons/react/24/outline"; 10 | 11 | export function Notifications() { 12 | const [showAlerts, setShowAlerts] = React.useState({ 13 | blue: true, 14 | green: true, 15 | orange: true, 16 | red: true, 17 | }); 18 | const [showAlertsWithIcon, setShowAlertsWithIcon] = React.useState({ 19 | blue: true, 20 | green: true, 21 | orange: true, 22 | red: true, 23 | }); 24 | const alerts = ["gray", "green", "orange", "red"]; 25 | 26 | return ( 27 |
28 | 29 | 35 | 36 | Alerts 37 | 38 | 39 | 40 | {alerts.map((color) => ( 41 | setShowAlerts((current) => ({ ...current, [color]: false }))} 46 | > 47 | A simple {color} alert with an example link. Give 48 | it a click if you like. 49 | 50 | ))} 51 | 52 | 53 | 54 | 60 | 61 | Alerts with Icon 62 | 63 | 64 | 65 | {alerts.map((color) => ( 66 | 72 | } 73 | onClose={() => setShowAlertsWithIcon((current) => ({ 74 | ...current, 75 | [color]: false, 76 | }))} 77 | > 78 | A simple {color} alert with an example link. Give 79 | it a click if you like. 80 | 81 | ))} 82 | 83 | 84 |
85 | ); 86 | } 87 | 88 | export default Notifications; 89 | -------------------------------------------------------------------------------- /src/pages/dashboard/profile.jsx: -------------------------------------------------------------------------------- 1 | import { 2 | Card, 3 | CardBody, 4 | CardHeader, 5 | CardFooter, 6 | Avatar, 7 | Typography, 8 | Tabs, 9 | TabsHeader, 10 | Tab, 11 | Switch, 12 | Tooltip, 13 | Button, 14 | } from "@material-tailwind/react"; 15 | import { 16 | HomeIcon, 17 | ChatBubbleLeftEllipsisIcon, 18 | Cog6ToothIcon, 19 | PencilIcon, 20 | } from "@heroicons/react/24/solid"; 21 | import { Link } from "react-router-dom"; 22 | import { ProfileInfoCard, MessageCard } from "@/widgets/cards"; 23 | import { platformSettingsData, conversationsData, projectsData } from "@/data"; 24 | 25 | export function Profile() { 26 | return ( 27 | <> 28 |
29 |
30 |
31 | 32 | 33 |
34 |
35 | 42 |
43 | 44 | Richard Davis 45 | 46 | 50 | CEO / Co-Founder 51 | 52 |
53 |
54 |
55 | 56 | 57 | 58 | 59 | App 60 | 61 | 62 | 63 | Message 64 | 65 | 66 | 67 | Settings 68 | 69 | 70 | 71 |
72 |
73 |
74 |
75 | 76 | Platform Settings 77 | 78 |
79 | {platformSettingsData.map(({ title, options }) => ( 80 |
81 | 82 | {title} 83 | 84 |
85 | {options.map(({ checked, label }) => ( 86 | 95 | ))} 96 |
97 |
98 | ))} 99 |
100 |
101 | 111 | 112 | 113 | 114 |
115 | ), 116 | }} 117 | action={ 118 | 119 | 120 | 121 | } 122 | /> 123 |
124 | 125 | Platform Settings 126 | 127 |
    128 | {conversationsData.map((props) => ( 129 | 134 | reply 135 | 136 | } 137 | /> 138 | ))} 139 |
140 |
141 |
142 |
143 | 144 | Projects 145 | 146 | 150 | Architects design houses 151 | 152 |
153 | {projectsData.map( 154 | ({ img, title, description, tag, route, members }) => ( 155 | 156 | 161 | {title} 166 | 167 | 168 | 172 | {tag} 173 | 174 | 179 | {title} 180 | 181 | 185 | {description} 186 | 187 | 188 | 189 | 190 | 193 | 194 |
195 | {members.map(({ img, name }, key) => ( 196 | 197 | 206 | 207 | ))} 208 |
209 |
210 |
211 | ) 212 | )} 213 |
214 |
215 | 216 | 217 | 218 | ); 219 | } 220 | 221 | export default Profile; 222 | -------------------------------------------------------------------------------- /src/pages/dashboard/tables.jsx: -------------------------------------------------------------------------------- 1 | import { 2 | Card, 3 | CardHeader, 4 | CardBody, 5 | Typography, 6 | Avatar, 7 | Chip, 8 | Tooltip, 9 | Progress, 10 | } from "@material-tailwind/react"; 11 | import { EllipsisVerticalIcon } from "@heroicons/react/24/outline"; 12 | import { authorsTableData, projectsTableData } from "@/data"; 13 | 14 | export function Tables() { 15 | return ( 16 |
17 | 18 | 19 | 20 | Authors Table 21 | 22 | 23 | 24 | 25 | 26 | 27 | {["author", "function", "status", "employed", ""].map((el) => ( 28 | 39 | ))} 40 | 41 | 42 | 43 | {authorsTableData.map( 44 | ({ img, name, email, job, online, date }, key) => { 45 | const className = `py-3 px-5 ${ 46 | key === authorsTableData.length - 1 47 | ? "" 48 | : "border-b border-blue-gray-50" 49 | }`; 50 | 51 | return ( 52 | 53 | 70 | 78 | 86 | 91 | 100 | 101 | ); 102 | } 103 | )} 104 | 105 |
32 | 36 | {el} 37 | 38 |
54 |
55 | 56 |
57 | 62 | {name} 63 | 64 | 65 | {email} 66 | 67 |
68 |
69 |
71 | 72 | {job[0]} 73 | 74 | 75 | {job[1]} 76 | 77 | 79 | 85 | 87 | 88 | {date} 89 | 90 | 92 | 97 | Edit 98 | 99 |
106 |
107 |
108 | 109 | 110 | 111 | Projects Table 112 | 113 | 114 | 115 | 116 | 117 | 118 | {["companies", "members", "budget", "completion", ""].map( 119 | (el) => ( 120 | 131 | ) 132 | )} 133 | 134 | 135 | 136 | {projectsTableData.map( 137 | ({ img, name, members, budget, completion }, key) => { 138 | const className = `py-3 px-5 ${ 139 | key === projectsTableData.length - 1 140 | ? "" 141 | : "border-b border-blue-gray-50" 142 | }`; 143 | 144 | return ( 145 | 146 | 158 | 173 | 181 | 197 | 209 | 210 | ); 211 | } 212 | )} 213 | 214 |
124 | 128 | {el} 129 | 130 |
147 |
148 | 149 | 154 | {name} 155 | 156 |
157 |
159 | {members.map(({ img, name }, key) => ( 160 | 161 | 170 | 171 | ))} 172 | 174 | 178 | {budget} 179 | 180 | 182 |
183 | 187 | {completion}% 188 | 189 | 195 |
196 |
198 | 203 | 207 | 208 |
215 |
216 |
217 |
218 | ); 219 | } 220 | 221 | export default Tables; 222 | -------------------------------------------------------------------------------- /src/routes.jsx: -------------------------------------------------------------------------------- 1 | import { 2 | HomeIcon, 3 | UserCircleIcon, 4 | TableCellsIcon, 5 | InformationCircleIcon, 6 | ServerStackIcon, 7 | RectangleStackIcon, 8 | } from "@heroicons/react/24/solid"; 9 | import { Home, Profile, Tables, Notifications } from "@/pages/dashboard"; 10 | import { SignIn, SignUp } from "@/pages/auth"; 11 | 12 | const icon = { 13 | className: "w-5 h-5 text-inherit", 14 | }; 15 | 16 | export const routes = [ 17 | { 18 | layout: "dashboard", 19 | pages: [ 20 | { 21 | icon: , 22 | name: "dashboard", 23 | path: "/home", 24 | element: , 25 | }, 26 | { 27 | icon: , 28 | name: "profile", 29 | path: "/profile", 30 | element: , 31 | }, 32 | { 33 | icon: , 34 | name: "tables", 35 | path: "/tables", 36 | element: , 37 | }, 38 | { 39 | icon: , 40 | name: "notifications", 41 | path: "/notifications", 42 | element: , 43 | }, 44 | ], 45 | }, 46 | { 47 | title: "auth pages", 48 | layout: "auth", 49 | pages: [ 50 | { 51 | icon: , 52 | name: "sign in", 53 | path: "/sign-in", 54 | element: , 55 | }, 56 | { 57 | icon: , 58 | name: "sign up", 59 | path: "/sign-up", 60 | element: , 61 | }, 62 | ], 63 | }, 64 | ]; 65 | 66 | export default routes; 67 | -------------------------------------------------------------------------------- /src/widgets/cards/index.js: -------------------------------------------------------------------------------- 1 | export * from "@/widgets/cards/statistics-card"; 2 | export * from "@/widgets/cards/profile-info-card"; 3 | export * from "@/widgets/cards/message-card"; 4 | -------------------------------------------------------------------------------- /src/widgets/cards/message-card.jsx: -------------------------------------------------------------------------------- 1 | import PropTypes from "prop-types"; 2 | import { Avatar, Typography } from "@material-tailwind/react"; 3 | 4 | export function MessageCard({ img, name, message, action }) { 5 | return ( 6 |
7 |
8 | 14 |
15 | 20 | {name} 21 | 22 | 23 | {message} 24 | 25 |
26 |
27 | {action} 28 |
29 | ); 30 | } 31 | 32 | MessageCard.defaultProps = { 33 | action: null, 34 | }; 35 | 36 | MessageCard.propTypes = { 37 | img: PropTypes.string.isRequired, 38 | name: PropTypes.string.isRequired, 39 | message: PropTypes.node.isRequired, 40 | action: PropTypes.node, 41 | }; 42 | 43 | MessageCard.displayName = "/src/widgets/cards/message-card.jsx"; 44 | 45 | export default MessageCard; 46 | -------------------------------------------------------------------------------- /src/widgets/cards/profile-info-card.jsx: -------------------------------------------------------------------------------- 1 | import PropTypes from "prop-types"; 2 | import { 3 | Card, 4 | CardHeader, 5 | CardBody, 6 | Typography, 7 | } from "@material-tailwind/react"; 8 | 9 | export function ProfileInfoCard({ title, description, details, action }) { 10 | return ( 11 | 12 | 18 | 19 | {title} 20 | 21 | {action} 22 | 23 | 24 | {description && ( 25 | 29 | {description} 30 | 31 | )} 32 | {description && details ? ( 33 |
34 | ) : null} 35 | {details && ( 36 |
    37 | {Object.keys(details).map((el, key) => ( 38 |
  • 39 | 44 | {el}: 45 | 46 | {typeof details[el] === "string" ? ( 47 | 51 | {details[el]} 52 | 53 | ) : ( 54 | details[el] 55 | )} 56 |
  • 57 | ))} 58 |
59 | )} 60 |
61 |
62 | ); 63 | } 64 | 65 | ProfileInfoCard.defaultProps = { 66 | action: null, 67 | description: null, 68 | details: {}, 69 | }; 70 | 71 | ProfileInfoCard.propTypes = { 72 | title: PropTypes.string.isRequired, 73 | description: PropTypes.node, 74 | details: PropTypes.object, 75 | }; 76 | 77 | ProfileInfoCard.displayName = "/src/widgets/cards/profile-info-card.jsx"; 78 | 79 | export default ProfileInfoCard; 80 | -------------------------------------------------------------------------------- /src/widgets/cards/statistics-card.jsx: -------------------------------------------------------------------------------- 1 | import { 2 | Card, 3 | CardHeader, 4 | CardBody, 5 | CardFooter, 6 | Typography, 7 | } from "@material-tailwind/react"; 8 | import PropTypes from "prop-types"; 9 | 10 | export function StatisticsCard({ color, icon, title, value, footer }) { 11 | return ( 12 | 13 | 20 | {icon} 21 | 22 | 23 | 24 | {title} 25 | 26 | 27 | {value} 28 | 29 | 30 | {footer && ( 31 | 32 | {footer} 33 | 34 | )} 35 | 36 | ); 37 | } 38 | 39 | StatisticsCard.defaultProps = { 40 | color: "blue", 41 | footer: null, 42 | }; 43 | 44 | StatisticsCard.propTypes = { 45 | color: PropTypes.oneOf([ 46 | "white", 47 | "blue-gray", 48 | "gray", 49 | "brown", 50 | "deep-orange", 51 | "orange", 52 | "amber", 53 | "yellow", 54 | "lime", 55 | "light-green", 56 | "green", 57 | "teal", 58 | "cyan", 59 | "light-blue", 60 | "blue", 61 | "indigo", 62 | "deep-purple", 63 | "purple", 64 | "pink", 65 | "red", 66 | ]), 67 | icon: PropTypes.node.isRequired, 68 | title: PropTypes.node.isRequired, 69 | value: PropTypes.node.isRequired, 70 | footer: PropTypes.node, 71 | }; 72 | 73 | StatisticsCard.displayName = "/src/widgets/cards/statistics-card.jsx"; 74 | 75 | export default StatisticsCard; 76 | -------------------------------------------------------------------------------- /src/widgets/charts/index.js: -------------------------------------------------------------------------------- 1 | export * from "@/widgets/charts/statistics-chart"; 2 | -------------------------------------------------------------------------------- /src/widgets/charts/statistics-chart.jsx: -------------------------------------------------------------------------------- 1 | import { 2 | Card, 3 | CardHeader, 4 | CardBody, 5 | CardFooter, 6 | Typography, 7 | } from "@material-tailwind/react"; 8 | import PropTypes from "prop-types"; 9 | import Chart from "react-apexcharts"; 10 | 11 | export function StatisticsChart({ color, chart, title, description, footer }) { 12 | return ( 13 | 14 | 15 | 16 | 17 | 18 | 19 | {title} 20 | 21 | 22 | {description} 23 | 24 | 25 | {footer && ( 26 | 27 | {footer} 28 | 29 | )} 30 | 31 | ); 32 | } 33 | 34 | StatisticsChart.defaultProps = { 35 | color: "blue", 36 | footer: null, 37 | }; 38 | 39 | StatisticsChart.propTypes = { 40 | color: PropTypes.oneOf([ 41 | "white", 42 | "blue-gray", 43 | "gray", 44 | "brown", 45 | "deep-orange", 46 | "orange", 47 | "amber", 48 | "yellow", 49 | "lime", 50 | "light-green", 51 | "green", 52 | "teal", 53 | "cyan", 54 | "light-blue", 55 | "blue", 56 | "indigo", 57 | "deep-purple", 58 | "purple", 59 | "pink", 60 | "red", 61 | ]), 62 | chart: PropTypes.object.isRequired, 63 | title: PropTypes.node.isRequired, 64 | description: PropTypes.node.isRequired, 65 | footer: PropTypes.node, 66 | }; 67 | 68 | StatisticsChart.displayName = "/src/widgets/charts/statistics-chart.jsx"; 69 | 70 | export default StatisticsChart; 71 | -------------------------------------------------------------------------------- /src/widgets/layout/configurator.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { XMarkIcon } from "@heroicons/react/24/outline"; 3 | import { 4 | Button, 5 | IconButton, 6 | Switch, 7 | Typography, 8 | Chip, 9 | } from "@material-tailwind/react"; 10 | import { 11 | useMaterialTailwindController, 12 | setOpenConfigurator, 13 | setSidenavColor, 14 | setSidenavType, 15 | setFixedNavbar, 16 | } from "@/context"; 17 | 18 | function formatNumber(number, decPlaces) { 19 | decPlaces = Math.pow(10, decPlaces); 20 | 21 | const abbrev = ["K", "M", "B", "T"]; 22 | 23 | for (let i = abbrev.length - 1; i >= 0; i--) { 24 | var size = Math.pow(10, (i + 1) * 3); 25 | 26 | if (size <= number) { 27 | number = Math.round((number * decPlaces) / size) / decPlaces; 28 | 29 | if (number == 1000 && i < abbrev.length - 1) { 30 | number = 1; 31 | i++; 32 | } 33 | 34 | number += abbrev[i]; 35 | 36 | break; 37 | } 38 | } 39 | 40 | return number; 41 | } 42 | 43 | export function Configurator() { 44 | const [controller, dispatch] = useMaterialTailwindController(); 45 | const { openConfigurator, sidenavColor, sidenavType, fixedNavbar } = 46 | controller; 47 | const [stars, setStars] = React.useState(0); 48 | 49 | const sidenavColors = { 50 | white: "from-gray-100 to-gray-100 border-gray-200", 51 | dark: "from-black to-black border-gray-200", 52 | green: "from-green-400 to-green-600", 53 | orange: "from-orange-400 to-orange-600", 54 | red: "from-red-400 to-red-600", 55 | pink: "from-pink-400 to-pink-600", 56 | }; 57 | 58 | React.useEffect(() => { 59 | const stars = fetch( 60 | "https://api.github.com/repos/creativetimofficial/material-tailwind-dashboard-react" 61 | ) 62 | .then((response) => response.json()) 63 | .then((data) => setStars(formatNumber(data.stargazers_count, 1))); 64 | }, []); 65 | 66 | return ( 67 | 232 | ); 233 | } 234 | 235 | Configurator.displayName = "/src/widgets/layout/configurator.jsx"; 236 | 237 | export default Configurator; 238 | -------------------------------------------------------------------------------- /src/widgets/layout/dashboard-navbar.jsx: -------------------------------------------------------------------------------- 1 | import { useLocation, Link } from "react-router-dom"; 2 | import { 3 | Navbar, 4 | Typography, 5 | Button, 6 | IconButton, 7 | Breadcrumbs, 8 | Input, 9 | Menu, 10 | MenuHandler, 11 | MenuList, 12 | MenuItem, 13 | Avatar, 14 | } from "@material-tailwind/react"; 15 | import { 16 | UserCircleIcon, 17 | Cog6ToothIcon, 18 | BellIcon, 19 | ClockIcon, 20 | CreditCardIcon, 21 | Bars3Icon, 22 | } from "@heroicons/react/24/solid"; 23 | import { 24 | useMaterialTailwindController, 25 | setOpenConfigurator, 26 | setOpenSidenav, 27 | } from "@/context"; 28 | 29 | export function DashboardNavbar() { 30 | const [controller, dispatch] = useMaterialTailwindController(); 31 | const { fixedNavbar, openSidenav } = controller; 32 | const { pathname } = useLocation(); 33 | const [layout, page] = pathname.split("/").filter((el) => el !== ""); 34 | 35 | return ( 36 | 46 |
47 |
48 | 53 | 54 | 59 | {layout} 60 | 61 | 62 | 67 | {page} 68 | 69 | 70 | 71 | {page} 72 | 73 |
74 |
75 |
76 | 77 |
78 | setOpenSidenav(dispatch, !openSidenav)} 83 | > 84 | 85 | 86 | 87 | 95 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 117 |
118 | 123 | New message from Laur 124 | 125 | 130 | 13 minutes ago 131 | 132 |
133 |
134 | 135 | 141 |
142 | 147 | New album by Travis Scott 148 | 149 | 154 | 1 day ago 155 | 156 |
157 |
158 | 159 |
160 | 161 |
162 |
163 | 168 | Payment successfully completed 169 | 170 | 175 | 2 days ago 176 | 177 |
178 |
179 |
180 |
181 | setOpenConfigurator(dispatch, true)} 185 | > 186 | 187 | 188 |
189 |
190 |
191 | ); 192 | } 193 | 194 | DashboardNavbar.displayName = "/src/widgets/layout/dashboard-navbar.jsx"; 195 | 196 | export default DashboardNavbar; 197 | -------------------------------------------------------------------------------- /src/widgets/layout/footer.jsx: -------------------------------------------------------------------------------- 1 | import PropTypes from "prop-types"; 2 | import { Typography } from "@material-tailwind/react"; 3 | import { HeartIcon } from "@heroicons/react/24/solid"; 4 | 5 | export function Footer({ brandName, brandLink, routes }) { 6 | const year = new Date().getFullYear(); 7 | 8 | return ( 9 |
10 |
11 | 12 | © {year}, made with{" "} 13 | by{" "} 14 | 19 | {brandName} 20 | {" "} 21 | for a better web. 22 | 23 |
    24 | {routes.map(({ name, path }) => ( 25 |
  • 26 | 33 | {name} 34 | 35 |
  • 36 | ))} 37 |
38 |
39 |
40 | ); 41 | } 42 | 43 | Footer.defaultProps = { 44 | brandName: "Creative Tim", 45 | brandLink: "https://www.creative-tim.com", 46 | routes: [ 47 | { name: "Creative Tim", path: "https://www.creative-tim.com" }, 48 | { name: "About Us", path: "https://www.creative-tim.com/presentation" }, 49 | { name: "Blog", path: "https://www.creative-tim.com/blog" }, 50 | { name: "License", path: "https://www.creative-tim.com/license" }, 51 | ], 52 | }; 53 | 54 | Footer.propTypes = { 55 | brandName: PropTypes.string, 56 | brandLink: PropTypes.string, 57 | routes: PropTypes.arrayOf(PropTypes.object), 58 | }; 59 | 60 | Footer.displayName = "/src/widgets/layout/footer.jsx"; 61 | 62 | export default Footer; 63 | -------------------------------------------------------------------------------- /src/widgets/layout/index.js: -------------------------------------------------------------------------------- 1 | export * from "@/widgets/layout/sidenav"; 2 | export * from "@/widgets/layout/dashboard-navbar"; 3 | export * from "@/widgets/layout/configurator"; 4 | export * from "@/widgets/layout/footer"; 5 | export * from "@/widgets/layout/navbar"; 6 | -------------------------------------------------------------------------------- /src/widgets/layout/navbar.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import PropTypes from "prop-types"; 3 | import { Link } from "react-router-dom"; 4 | import { 5 | Navbar as MTNavbar, 6 | Collapse, 7 | Typography, 8 | Button, 9 | IconButton, 10 | } from "@material-tailwind/react"; 11 | import { Bars3Icon, XMarkIcon } from "@heroicons/react/24/outline"; 12 | 13 | export function Navbar({ brandName, routes, action }) { 14 | const [openNav, setOpenNav] = React.useState(false); 15 | 16 | React.useEffect(() => { 17 | window.addEventListener( 18 | "resize", 19 | () => window.innerWidth >= 960 && setOpenNav(false) 20 | ); 21 | }, []); 22 | 23 | const navList = ( 24 |
    25 | {routes.map(({ name, path, icon }) => ( 26 | 33 | 34 | {icon && 35 | React.createElement(icon, { 36 | className: "w-[18px] h-[18px] opacity-50 mr-1", 37 | })} 38 | {name} 39 | 40 | 41 | ))} 42 |
43 | ); 44 | 45 | return ( 46 | 47 |
48 | 49 | 53 | {brandName} 54 | 55 | 56 |
{navList}
57 | {React.cloneElement(action, { 58 | className: "hidden lg:inline-block", 59 | })} 60 | setOpenNav(!openNav)} 65 | > 66 | {openNav ? ( 67 | 68 | ) : ( 69 | 70 | )} 71 | 72 |
73 | 74 |
75 | {navList} 76 | {React.cloneElement(action, { 77 | className: "w-full block lg:hidden", 78 | })} 79 |
80 |
81 |
82 | ); 83 | } 84 | 85 | Navbar.defaultProps = { 86 | brandName: "Material Tailwind React", 87 | action: ( 88 | 92 | 95 | 96 | ), 97 | }; 98 | 99 | Navbar.propTypes = { 100 | brandName: PropTypes.string, 101 | routes: PropTypes.arrayOf(PropTypes.object).isRequired, 102 | action: PropTypes.node, 103 | }; 104 | 105 | Navbar.displayName = "/src/widgets/layout/navbar.jsx"; 106 | 107 | export default Navbar; 108 | -------------------------------------------------------------------------------- /src/widgets/layout/sidenav.jsx: -------------------------------------------------------------------------------- 1 | import PropTypes from "prop-types"; 2 | import { Link, NavLink } from "react-router-dom"; 3 | import { XMarkIcon } from "@heroicons/react/24/outline"; 4 | import { 5 | Avatar, 6 | Button, 7 | IconButton, 8 | Typography, 9 | } from "@material-tailwind/react"; 10 | import { useMaterialTailwindController, setOpenSidenav } from "@/context"; 11 | 12 | export function Sidenav({ brandImg, brandName, routes }) { 13 | const [controller, dispatch] = useMaterialTailwindController(); 14 | const { sidenavColor, sidenavType, openSidenav } = controller; 15 | const sidenavTypes = { 16 | dark: "bg-gradient-to-br from-gray-800 to-gray-900", 17 | white: "bg-white shadow-sm", 18 | transparent: "bg-transparent", 19 | }; 20 | 21 | return ( 22 | 95 | ); 96 | } 97 | 98 | Sidenav.defaultProps = { 99 | brandImg: "/img/logo-ct.png", 100 | brandName: "Material Tailwind React", 101 | }; 102 | 103 | Sidenav.propTypes = { 104 | brandImg: PropTypes.string, 105 | brandName: PropTypes.string, 106 | routes: PropTypes.arrayOf(PropTypes.object).isRequired, 107 | }; 108 | 109 | Sidenav.displayName = "/src/widgets/layout/sidnave.jsx"; 110 | 111 | export default Sidenav; 112 | -------------------------------------------------------------------------------- /tailwind.config.cjs: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | const withMT = require("@material-tailwind/react/utils/withMT"); 3 | 4 | module.exports = withMT({ 5 | content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"], 6 | theme: { 7 | extend: {}, 8 | }, 9 | plugins: [], 10 | }); 11 | -------------------------------------------------------------------------------- /vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import react from "@vitejs/plugin-react"; 3 | 4 | export default defineConfig({ 5 | plugins: [react()], 6 | resolve: { 7 | alias: [{ find: "@", replacement: "/src" }], 8 | }, 9 | }); 10 | --------------------------------------------------------------------------------