A simple React + Vite project that lets users toggle between light and dark themes using a modern UI switch. The theme switch is actually very simple but doing with Context Api makes the code Prduction grade and let you not pass the props in every component.
- Toggle between light and dark mode
- Responsive card layout
- Tailwind CSS styling
- Theme state managed through React context
- Deployable to GitHub Pages
- React
- Vite
- Tailwind CSS
- React Context API
npm installnpm run devnpm run buildnpm run deploysrc/
components/
Card.jsx
ThemeBtn.jsx
contexts/
theme.js
App.jsx
main.jsx
This project is open source and available under the MIT License.