A simple and beginner-friendly React + Vite project that implements a Light / Dark Theme Toggle feature.
ThemeToggle demonstrates how to switch between light and dark themes in a React application. It helps beginners understand state management, event handling, and basic UI theming.
- 🌞 Light Mode & 🌙 Dark Mode
- 🔄 Toggle theme with a button
- ⚡ Built using React + Vite
- 🧠 Simple and clean logic (beginner friendly)
- React
- Vite
- JavaScript
- CSS
ThemeToggle/
├── public/
├── src/
│ ├── App.jsx
│ ├── main.jsx
│ ├── index.css
│ └── components/
├── package.json
├── vite.config.js
└── README.md
git clone https://github.com/HarshaSai1234/ThemeToggle.gitcd ThemeTogglenpm installnpm run devOpen the browser and visit:
http://localhost:5173
- A button toggles the theme state
- CSS classes change based on theme
- UI updates instantly on toggle
- Light Theme Interface
- Dark Theme Interface
- Smooth theme switching
Contributions are welcome! Feel free to fork this repo and submit pull requests.
This project is licensed under the MIT License.
Harsha Sai GitHub: https://github.com/HarshaSai1234
⭐ If you like this project, don’t forget to star the repository!