Skip to main content
drupalreleases
Release: Cms 2.2.3 — Update released for Drupal core (2.2.3)! Release: Libraries API 4.2.1 — Minor update available for module libraries (4.2.1). Release: Menu Link Attributes 8.x-1.10 — Minor update available for module menu_link_attributes (8.x-1.10). Release: Menu Link Attributes 8.x-1.9 — Minor update available for module menu_link_attributes (8.x-1.9). Release: Taxonomy Menu 8.x-3.9 — Minor update available for module taxonomy_menu (8.x-3.9). Release: Menu Item Extras 3.2.0 — Minor update available for module menu_item_extras (3.2.0). Release: Layout Paragraphs 2.1.4 — Minor update available for module layout_paragraphs (2.1.4). Release: PhotoSwipe - Responsive JavaScript Modal Image Gallery 5.0.11 — Minor update available for module photoswipe (5.0.11). Module Revived: Libraries API 4.2.0 — Module libraries updated after 11 months of inactivity (4.2.0). Security Coverage: Open Y Branch Selector — Module openy_branch_selector now has official Drupal security advisory coverage.

Configurable Theme Libraries

35 sites Security covered Drupal 8–11
View on drupal.org

This module allows you to define and manage theme libraries directly within your theme's `info.yml` file. You can then enable or disable these libraries through the Drupal admin interface, giving you on-the-fly control over your theme's styling and assets without needing to modify code or build new themes. This is useful for scenarios like easily switching between different design presets for a site.

This module provides a neat solution to define configurable theme libraries in
your THEME.info.yml file. These libraries can be enabled or disabled for a
given theme on the fly. This makes it possible to control active libraries via in the interface. An example usage could be the implementation of two different global styling libraries to change the appearance of the theme.

To make it work for your theme there are a few steps you should take:

  • Define at least one configurable library in your THEME.info.yml. Defining
    them is done by using the configurable-libraries key. This module scans
    the active theme for these to register them.
  • Configure which libraries will be used at /admin/appearance/settings/YOUR_THEME

Each configurable library can contain their own library definitions as normally
used in the THEME.info.yml. This consists of:

  • libraries
  • libraries-extend
  • libraries-override

An example definition looks like:

configurable-libraries:
  global-styling-green:
    name: Global Styling (Green)
    libraries:
      - my_theme/global-styling-green
    libraries-override:
      - my_theme/global-styling: false
  global-styling-blue:
    name: Global Styling (Blue)
    description: This makes the site blue.
    libraries:
      - my_theme/global-styling-blue
    libraries-override:
      - my_theme/global-styling: false

Installation

Install this module as any other Drupal module, see the documentation on
Drupal.org.

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

Release Timeline

Releases

Version Type Core Release date
2.3.1 Stable 8–11 May 27, 2026
2.3.0 Stable 8–11 May 26, 2026
2.2.0 Stable 8–10 Oct 2, 2023
2.1.0 Stable 8–10 Sep 27, 2023