Drupal is a registered trademark of Dries Buytaert
drupal 10.6.12 Update released for Drupal core (10.6.12)! drupal 11.3.13 Update released for Drupal core (11.3.13)! drupal 10.6.11 Update released for Drupal core (10.6.11)! drupal 11.3.12 Update released for Drupal core (11.3.12)! drupal 11.2.14 Update released for Drupal core (11.2.14)! drupal 10.5.12 Update released for Drupal core (10.5.12)! cms 2.1.3 Update released for Drupal core (2.1.3)! drupal 10.5.11 Update released for Drupal core (10.5.11)! drupal 11.3.11 Update released for Drupal core (11.3.11)! drupal 11.2.13 Update released for Drupal core (11.2.13)! drupal 10.6.10 Update released for Drupal core (10.6.10)! cms 2.1.2 Update released for Drupal core (2.1.2)! drupal 11.1.10 Update released for Drupal core (11.1.10)! drupal 10.5.10 Update released for Drupal core (10.5.10)! drupal 10.4.10 Update released for Drupal core (10.4.10)! drupal 11.2.12 Update released for Drupal core (11.2.12)! drupal 11.3.10 Update released for Drupal core (11.3.10)! drupal 10.6.9 Update released for Drupal core (10.6.9)! drupal 10.6.8 Update released for Drupal core (10.6.8)! drupal 11.3.9 Update released for Drupal core (11.3.9)!

sticky

Security covered
View on drupal.org

Creating sticky elements for example a header, a footer, or any other element on your website has never been easier.

The Sticky module implements the Sticky JS library and lets you make any element stay visible on scroll, configured entirely through the UI.

Requirements

  • Drupal 11 or 12
  • The Sticky JS library (garand/sticky) - installed automatically via Composer (see below)

Installation (recommended, via Composer)

The Sticky JS library is not on Packagist, so add this package definition to the repositories section of your project's root composer.json:

{
    "type": "package",
    "package": {
        "name": "garand/sticky",
        "version": "1.0.4",
        "type": "drupal-library",
        "license": "MIT",
        "dist": {
            "type": "zip",
            "url": "https://github.com/garand/sticky/archive/refs/tags/1.0.4.zip"
        },
        "require": {
            "composer/installers": "^1.0 || ^2.0"
        }
    }
}

Make sure your root composer.json maps the drupal-library type to the libraries directory (the drupal/recommended-project template already does this):

"installer-paths": {
    "web/libraries/{$name}": ["type:drupal-library"]
}

Then install the module — the library is fetched into /libraries/sticky along with it:

composer require drupal/sticky

Manual installation

Alternatively, download version 1.0.x of the Sticky library, rename the folder to sticky, and place it in /libraries/ in your Drupal root.

Configuration

  1. Enable the module and clear the cache.
  2. Go to Administration » Configuration » System » Sticky (/admin/config/system/sticky).
  3. Set the DOM selector for the element you want to make sticky.
  4. Optionally adjust the JavaScript settings (spacing, z-index, etc.).
  5. Save the configuration.

Maintainer

Fons Vandamme

Activity

Total releases
1
First release
Jun 2026
Latest release
23 hours ago
Release cadence
Stability
100% stable

Releases

Version Type Release date
2.3.0 Stable Jun 30, 2026