# sandoche/Darkmode.js

🌓 Add a dark-mode / night-mode to your website in a few seconds

Repository: https://github.com/sandoche/Darkmode.js
Canonical: https://ross.abutalabs.com/products/darkmodejs
Homepage: https://darkmodejs.learn.uno
Language: JavaScript
License: MIT
License Family: permissive
Topics: darkmode, npm, npm-package, npm-module, dark-theme, dark, nightmode, vanilla-js, widget
Last push: 2023-03-28T12:35:03+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 2638, "days_push": 1254, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2773, forks 172 (observed 2026-08-28T04:07:19.119288+00:00)

## What it is
Darkmode.js is a lightweight vanilla JavaScript library that adds a dark-mode/night-mode toggle to any website using CSS mix-blend-mode. It provides an automatic floating widget, remembers the user's choice in localStorage, and respects the OS prefers-color-scheme setting.

## Use cases
- add dark mode to a website in seconds
- drop-in night mode toggle widget for any site
- respect user's OS dark theme preference
- remember dark mode setting across visits
- programmatically toggle dark mode without a widget
- add dark theme to WordPress or Drupal site

## When to choose
- you want a zero-config, copy-paste dark mode solution
- your site lacks a native dark theme and you need a quick fix
- you want a lightweight vanilla JS widget with no dependencies

## When to avoid
- you need a fully designed, per-component dark theme rather than a blend-mode filter
- mix-blend-mode rendering artifacts are unacceptable for your design
- you need fine-grained theming with CSS variables or design tokens

## Facets
- artifact type: library
- maturity: maintenance
- function: ui-components, theme
- domain: frontend, web-development, accessibility
- platform: browser
- tags: dark-mode, vanilla-js, widget, mix-blend-mode, npm-package, theme-toggle, javascript, nodejs

## Member repositories
- sandoche/Darkmode.js (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:19.119288+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T08:16:36.574144+00:00, confidence not recorded.
  - readme: https://github.com/sandoche/Darkmode.js (fetched 2026-08-28T04:07:19.119288+00:00, sha 7961648d07a1)
  - homepage: https://darkmodejs.learn.uno (fetched 2026-08-29T09:56:09.527268+00:00, sha 7f976c5bb3dc)
- Data as of 2026-08-30T08:39:29.467469+00:00.
