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). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Barba.js

1 sites No security coverage
View on drupal.org

This module integrates Barba.js to provide smooth, SPA-like page transitions for your Drupal site. It allows for quick setup with automatic loading of local builds or a CDN fallback, and an optional UI for granular control over where and how the transitions are applied.

Barba JS integrates the Barba.js library with Drupal to deliver smooth,
SPA‑like page transitions with minimal setup. It auto‑loads a local build when
present, or falls back to the official CDN. The optional UI submodule lets you
control where and how the library is attached.

Features

  • Smooth, SPA‑like page transitions using Barba.js.
  • No jQuery dependency; lightweight UMD builds.
  • Automatic local vs. CDN loading with safe fallback.
  • Optional plugins: CSS, Prefetch, Router.
  • Granular control via “Barba JS UI” (themes, paths, plugins, variant).

Use this module when you want faster, more fluid navigation without adopting a
full SPA framework. Typical use cases include content sites, portfolios, blogs,
and marketing pages where page transitions improve perceived performance and UX.

Post-Installation

  1. Enable Barba JS (auto‑attaches Barba to frontend pages).
  2. (Optional) Enable Barba JS UI for configuration at
    Configuration → User interface → Barba
    (/admin/config/user-interface/barba/settings).
  3. Choose attach method: Local (if UMD files exist) or CDN.
  4. Select plugins (CSS / Prefetch / Router) and build variant (min/non‑min).
  5. Limit loading by theme or by path patterns as needed.
  6. Add your transition code in your theme or a custom module:
    barba.init({
      transitions: [{
        name: 'fade',
        async leave({ current }) {
          await gsap.to(current.container, { opacity: 0 });
        },
        enter({ next }) {
          return gsap.from(next.container, { opacity: 0 });
        }
      }]
    });

Additional Requirements

  • None. Barba.js can load from the bundled dist/ or jsDelivr CDN.
  • (Optional) Local install: place UMD builds under
    libraries/barba/dist/ (or multisite equivalent).
  • Barba JS UI (submodule): adds a configuration UI.
  • GSAP (optional): for richer animation timelines.

Similar projects

Modules that provide PJAX/AJAX navigation may offer partial page swaps, but
Barba JS focuses on transition orchestration, view lifecycle hooks, and plugin
ecosystem (CSS/Prefetch/Router) while staying library‑agnostic and lightweight.

Supporting this Module

Enjoying this project? You can support maintenance and new features by
sponsoring issues on the project queue or contacting the maintainer on
Drupal.org.

Community Documentation

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
Aug 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 2
Maintenance
Dormant

Releases

Version Type Core Release date
1.0.0-alpha1 Pre-release 9–11 Aug 9, 2025
1.0.x-dev Dev 9–11 Aug 9, 2025