Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Bootstrap Light-Dark-Color Theme Mode Toggler

Security covered Under active development 27 sites

Part of the Bootstrap ecosystem · 46 projects

This module adds a block to your Drupal site that allows users to switch between light and dark color modes, utilizing features introduced in Bootstrap 5.3. It is designed for themes built with Bootstrap 5.3 or later, with particular recommendations for Bootstrap Barrio 5 Theme and its SASS-based derivatives.

The Bootstrap Theme Toggler Module enables switching of color modes for a Bootstrap based theme using the bootstrap library ver. 5.3 or later. With ver. 5.3, bootstrap introduced support for light & dark color modes. This module is a Drupal block that implements a theme changing toggle drop-down button to integrate this feature into your site. Any theme using bootstrap >5.3 can use this module, however Bootstrap Barrio 5 Theme, its related Bootstrap 5 - SASS Starter Kit, or any derivates are recommended.

Those utilizing bootstrap 5 SASS themes can make use of full re-templating of the 'light' and 'dark' modes, as well as add additional custom modes.

The Toggler configuration provides full customization of the visible drop-down menu elements.

For full instructions on implementation and usage of this module please review the module's documentation.

Quick Start - for Use With Bootstrap Barrio 5 Theme

See Theme Toggler documentation for Bootstrap Barrio 5 theme for detailed instruction

  1. Download & install the Barrio Bootstrap 5 Theme.
  2. Copy bootstrap folder in `../web/vendor/twbs/`, in full, to your sites libraries folder at `..web/libraries/`.
  3. Set Barrio Bootstrap 5 as the default theme.
  4. From the Bootstrap Barrio settings panel, change the `Load Library` to `Local`.
  5. From the Barrio settings->components->navbar structure, set all color settings to 'default'.
  6. Download & enable the Bootstrap Theme Toggler module.
  7. Place Theme Toggler block onto your site in any region.
  8. Use the `bootstrap_theme_toggler/css/_component_overrides.css` to allow theme mode's to override any Barrio classed components.

Quick Start - for Use With Bootstrap Barrio 5 SASS Theme

See Theme Toggler documentation for SASS sub-theme for detailed instruction

  1. Download & install the Barrio Bootstrap 5 Theme & SASS Starter Kit
  2. Create SASS sub-theme using Start Kit script & install theme dependencies
  3. If using Drupal 10, update `sass_sub_theme.libraries.yml`, `global-styling` library to reference `js/popper.min.js`.
  4. Set SASS sub-theme as the default theme for site.
  5. Download & enable the Bootstrap Theme Toggler module.
  6. Add `bootstrap_theme_toggler/scss/themes.scss` file to the SASS theme's `import.scss` file.
  7. Update SASS sub-theme's `gulpfile.js` to add Theme Toggler's scss folder to watch list.
  8. Place Theme Toggler block onto site in any region.
  9. Modify light & dark mode theme palettes using `bootstrap_theme_toggler/scss/default_overrides.scss`.
  10. Create/edit custom color mode's for additional theme palettes.

Additional Requirements

This module is intended for use with themes that are compatible with color modes introduced with Bootstrap 5.3.

Required Libraries

  • Bootstrap 5.3, or later
  • Popper.js (or bootstrap bundled with popper)

Bootstrap Barrio 5 Theme
Bootstrap 5 - SASS Start Kit based sub-themes

Drupal 10–11

Ask your assistant about Bootstrap Light-Dark-Color Theme Mode Toggler

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

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
6
Tracked since
Sep 2023
Latest release
2 weeks ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
2.1.0 Stable 10–11 Oct 30, 2026
2.0.0 Stable 9–10 Sep 22, 2023
1.1.0 Stable 9–10 Sep 16, 2023
1.0.1 Stable 9–10 Sep 15, 2023
1.0.0 Stable 9–10 Sep 15, 2023
1.0.x-dev Dev 9–10 Sep 12, 2023