Light Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GoogleChromeLabs/dark-mode-toggle

Repository files navigation

Element

A custom element that allows you to easily put a Dark Mode toggle or switch on your site, so you can initially adhere to your users' preferences according to prefers-color-scheme, but also allow them to (optionally permanently) override their system setting for just your site.

Read all(!) about dark mode in the related article Hello Darkness, My Old Friend.

Installation

Install from npm:

npm install --save dark-mode-toggle

Or, alternatively, use a