A button that toggles light/dark mode for HTML websites.
The darkmode-button.js file contains a script that can be implemented on any HTML website to create a button allowing the user to toggle between the site's light and dark modes. The preference is also stored in localStorage, so the website defaults to whichever mode the user chose last time when they open the website again.
The darkmode-button.html and style.css files give an example of how the button's functionality can be implemented in the HTML and CSS of a website.
The button can be seen in action here.
jamiegriffxn/darkmode-button
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|