nowfound

Life & fun · June 19, 2019

Library to add a dark-mode to your website in a few seconds

🌓 Add darkmode / nightmode to your website in a few seconds

Library to add a dark-mode to your website in a few seconds launched on June 19, 2019 with 22 votes, #689 of 2,757 launches that month and more than 75% of that year's launches. The site was still online in September 2026, 7 years on.

In plain words

DarkModeJS is a library that enables developers to add dark mode functionality to websites quickly. It allows users to toggle between light and dark color schemes with minimal setup required. The tool is designed for web developers and website owners looking to implement this feature without extensive custom coding. It integrates easily into existing projects and provides a straightforward way to enhance user experience by offering a dark mode option.

written from the facts on this page · September 2026

From the sources

This library uses the css mix-blend-mode in order to bring Dark-mode to any of your websites. Just copy paste the snippet and you will get a widget to turn on and off the dark-mode. You can also use it without the widget programmatically. The plugin is lightweight, built in VanillaJS. It also uses localstorage by default so your last setting will be remembered ! If you are using Wordpress you may want have a look to these plugins based on Darkmode.js: If you are using Drupal you may want to have a look at this plugin based on Darkmode.js: Darkmode.js is very easy to use, just copy paste the following code or use the npm package. If you don't want to show the widget and enable/disable…from darkmodejs.learn.uno

Does a similar job

all alternatives →

More life & fun this month

the category →

Source: Show HN post ↗

Launched alongside, June 2019

the whole month →