Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

theme_breakpoints_js

187 sites Security covered
View on drupal.org

This module exposes theme-related breakpoints as directly usable Javascript variables.

Usage

When developing client-side Javascript applications,
you might need to know about the breakpoints your currently used theme defines.
Themes can define breakpoints this way,
but they're not exposed automatically for client-side behaviors.

This module helps frontend developers by exposing the breakpoints
as Javascript variables, being directly accessible via
window.themeBreakpoints.

The function themeBreakpoints.getCurrentBreakpoint()
tells you the currently matching breakpoint for the given client.

A new event themeBreakpoint:changed is being provided, which fires
when the matching breakpoint of the client has changed. With this event, you're
able to implement responsive Javascript behaviors via event listeners.

Example event listener:

window.addEventListener('themeBreakpoint:changed', function (event) {
  alert('The current breakpoint has been changed to ' + event.detail.name);
});

Backend developers can use the theme_breakpoints_js
service for conveniently receiving breakpoints defined by themes.
It already takes care about defined breakpoints by base themes and also
loads them in case a theme doesn't define breakpoints by itself.

Installation

- This module obviously depends on Drupal core's breakpoint module.
- Install this module as usual.
- No configuration required. Once enabled, the currently used theme's breakpoints are available as JS variables.

Activity

Total releases
2
First release
Nov 2025
Latest release
5 months ago
Release cadence
1 day
Stability
50% stable

Releases

Version Type Release date
2.0.0 Stable Nov 11, 2025
2.x-dev Dev Nov 10, 2025