Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Olivero Dark Switch

13 sites Security covered
View on drupal.org

This module adds a dark mode toggle to the Olivero theme, allowing users to switch between light and dark modes. It seamlessly integrates with Olivero's design and uses local storage to remember user preferences, also respecting browser settings for dark mode.

Ever wanted to view your Drupal site in dark mode but love Olivero too much to give it up? This module adds a Drupal Block with a dark mode toggle themed to blend into Olivero. Simply place the block where you want the toggle on your site to enable optional dark theme!

Features

  • Provides a block containing the theme toggle. This block can be configured to float the toggle within the block region.
  • Alters Olivero's core CSS variables in order to seamlessly integrate with Olivero's colour picking functionality. More specifically, it reverses any gradient variables with small modifications in order to meet accessibility contrast standards.
  • Uses local storage to keep track of the toggle position chosen by a user.
  • Detects (prefers-color-scheme: dark) to provide the dark theme to users who have their browser preference set to dark mode.

Post-Installation

Once you have installed this module you will want to place the toggle block somewhere on your site. More Specifically,

  1. Go to Admin > Structure > Block Layout (admin/structure/block)
  2. Click on "Place Block" beside the region you want to place the dark theme toggle. We suggest "Hero (full width)"
  3. Now scroll down to "Olivero Dark Switch" in the list of potential blocks to place and click "Place block" beside it.
  4. Turn off "Display title" and set "Float" to "Right" before saving the block.
  5. Now go to the home page or any other Olivero themed page in your site and notice the toggle in the top right hand corner!

Additional Requirements

This module does not need any external libraries although it does assume you are using the Drupal Core Olivero theme ๐Ÿ˜‰.

Similar projects

Olivero Dark Mode

This module provides a full dark mode subtheme of Olivero. Note: Drupal core itself does not recommend subthemeing Olivero, specifically because it does not promise backwards compatibility.. This is why my module takes the approach of supplying a block that alters the theme instead.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Oct 2025
Latest release
10 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Slowing

Releases

Version Type Core Release date
1.0.x-dev Dev 10โ€“11 Oct 8, 2025
1.0.0-alpha1 Pre-release 10โ€“11 Oct 8, 2025