Add a Switch block to your Website to toggle a 'darkmode' CSS class.

It won't make your site Dark out of the box, but you will need to customise your CSS around the dark mode selector.

Installation

  • Enable Dark Mode Switch module like any other contrib module.
  • Configure settings here: /admin/config/user-interface/dark_mode_switch

Usage

  1. Place the Dark Mode Switch block in the region desired.
  2. Customize the markup using the template 'dark-mode-switch--block.html.twig'.
  3. Add the css selector '.darkmode' in your theme CSS.

Project information

Releases