๐ Live Demo
๐ A modern, responsive Dark/Light mode toggle with smooth animations, glassmorphism UI, and persistent theme storage. Built to practice UI/UX design, CSS animations, and state management using JavaScript.
- ๐งฑ HTML5
- ๐จ CSS3
- โ๏ธ JavaScript
- ๐ Light Mode / ๐ Dark Mode toggle
- ๐ฌ Smooth sliding animation (transform-based)
- ๐จ Glassmorphism modern UI design
- โก Instant theme switching
- ๐พ Theme saved using
localStorage - ๐ Dynamic mode text display
- โจ Icon transition (Sun โ Moon)
- ๐ฑ Fully responsive (Mobile โ Desktop)
- ๐ซ No layout shift or animation glitch
- ๐ฏ Smooth Toggle Animation โ Uses
transformfor GPU-accelerated sliding - ๐จ Modern UI โ Gradient background + glass effect
- ๐ฑ Responsive Design โ Built using
clamp()for all screen sizes - ๐พ Persistent State โ Remembers user preference
- ๐ง Clean Code โ Beginner-friendly + scalable structure
- ๐ Dynamic Icons โ Auto-switch based on mode
Follow these steps to run the project locally:
# 1. Clone the repository
git clone https://github.com/webdev-desktop/Dark-Light-Toggle.git
# 2. Navigate to the folder
cd Dark-Light-Toggle
# 3. Open in browser
Open index.html- Click on the toggle switch ๐
- Switch between Light ๐ and Dark ๐ mode
- Observe smooth sliding animation ๐ฌ
- Check dynamic text update ๐ง
- Refresh page โ mode stays saved ๐พ
- ๐ Advanced toggle animation (SVG morph)
- ๐ฌ Physics-based animation (GSAP)
- ๐จ Multiple theme options
- ๐ฑ Full settings panel UI
- ๐ Theme sync across devices
Contributions are welcome!
# Fork the repo
# Create a new branch
git checkout -b feature/your-feature
# Commit changes
git commit -m "Add your feature"
# Push to branch
git push origin feature/your-featureThen open a Pull Request ๐
Apurv
This project is licensed under the MIT License.
If you like this project, donโt forget to star โญ the repo and share it!

