100JSProjects
LearnProjectsExplore all projects
100JS_WORKSPACE/Build · Learn · Repeat
100JSProjects

Practical HTML, CSS, and JavaScript projects designed to help you turn concepts into real skills—one build at a time.

01Explore

./All projects./Learning guides./About./Contact./Privacy

02Resources

./GitHub repository./Support the project

© 2026 100 JS Projects. Built for developers.

TermsCookiesContact
JS//Projects/Dark Mode Toggle

Dark Mode Toggle

Build a dark mode toggle with HTML, CSS, and JavaScript while practicing local storage and input events.

Intermediate30–45 minutesHTML5CSS3JavaScript
You’ll practice
Local StorageInput EventsDOM Selection
View Source CodeLive Demo
demo.100jsprojects.com/dark-mode-toggle
Final resultDark Mode Toggle project previewTry Live Demo
01 — What you’ll build

Dark Mode Toggle

This project shows you how HTML, CSS, and JavaScript work together in a dark mode toggle. You’ll connect user interactions to visible changes on the page, then practice local storage, input events, and DOM selection as you build the complete project from scratch.

02 — Included
  • ✓Data saved in the browser
  • ✓Dark Mode Toggle interface
  • ✓Responsive HTML and CSS layout
  • ✓Complete source code and live demo
03 — You’ll practice
  • >Save and restore data with localStorage
  • >Respond to input changes
  • >Select HTML elements from the DOM
  • >Control behavior with conditions

Recommended knowledge: Basic HTML and CSS, JavaScript objects and arrays, JSON basics, JavaScript variables and number operations.

Complete project files

Build It from the Source Code

This project saves its data between browser sessions.

  1. 1Create 3 files
  2. →
  3. 2Copy the code
  4. →
  5. 3Run index.html
Before you run it
  • Saved data stays in this browser through local storage.
Project structure
dark-mode-toggle/
├──
├──
└──
Need help setting up the project?

Create project files, install Live Server, and run your first project.

Open beginner guide
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Dark Mode Toggle</title>
    <link rel="stylesheet" href="style.css" />
  </head>
  <body>
    <input type="checkbox" id="dark-mode" class="input" />
    <label for="dark-mode" class="label">
      <div class="circle"></div>
    </label>
    <script src="index.js"></script>
  </body>
</html>

JS// Related Projects

Practice with Related Projects

Practice local Storage, input events, and DOM Selection with these related projects.

Multiplication App project preview★Best match
Related: Local StorageIntermediate

Multiplication App

Save interface data and restore it between browser sessions.

Build a multiplication app →
Note Taking App project preview
Related: input eventsIntermediate

Note Taking App

Create editable notes and keep them saved in the browser.

Build a note taking app →
To do List project preview
Related: DOM SelectionIntermediate

To do List

Select page elements and control them with JavaScript.

Build a to do list →
Multiplication App project preview
Related: Local Storage★Best match

Multiplication App

Save interface data and restore it between browser sessions.

Build a multiplication app
Note Taking App project preview
Related: input events

Note Taking App

Create editable notes and keep them saved in the browser.

Build a note taking app
To do List project preview
Related: DOM Selection

To do List

Select page elements and control them with JavaScript.

Build a to do list
JS{ }Explore All JavaScript ProjectsBrowse by difficulty or concept.Explore All Projects