Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Sticky

Security covered Under active development 879 sites

Part of the Sticky ecosystem · 6 projects

The Sticky module allows you to easily make any element on your website, such as a header or footer, remain visible as the user scrolls. Configuration is managed entirely through the user interface.

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.

Sponsors



Drupal 11 · not 10

Ask your assistant about Sticky

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

Release Timeline

Releases

Version Type Core PHP Release date
2.3.0 Stable 11 Jun 30, 2026
2.2.2 Stable 10–11 Aug 28, 2024
2.2.1 Stable 10–11 Aug 14, 2024
2.2.0 Stable 10–11 Aug 14, 2024
2.1.1 Stable 9–10 Feb 3, 2023