lights-out
v1.0.0-alpha.3
Published
Automatic dark mode for your web app.
Downloads
2
Maintainers
Readme
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-outimport { LightsOut } from 'lights-out'[!IMPORTANT]
A browserwindowis required, i.e. no SSR.
// After DOMContentLoaded
new LightsOut().enable()