Socket
Book a DemoInstallSign in
Socket

lights-out

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lights-out

Automatic dark mode for your web app.

latest
Source
npmnpm
Version
1.0.0-alpha.3
Version published
Maintainers
1
Created
Source

Lights Out

Turn your web app's lights off.

[!WARNING]
There is a performance penalty with this approach.

Use it only when necessary or if the performance tradeoff is acceptable for your site.

What is this?

An exploration into dynamic dark mode. Some applications are large, old and burdened by a lack of standards which makes supporting a dark mode theme harder than it needs to be. This project attempts to remedy that by providing an automatic dark mode while the hard work of refactoring the codebase, so a more performant and standard approach to themeing can be developed, is underway.

Example

npm install lights-out
import { LightsOut } from 'lights-out'

[!IMPORTANT]
A browser window is required, i.e. no SSR.

// After DOMContentLoaded
new LightsOut().enable()

Keywords

automatic

FAQs

Package last updated on 10 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.