Skip to main content
drupalreleases
Release: Cms 2.2.3 — Update released for Drupal core (2.2.3)! Release: Easy Breadcrumb 2.0.11 — Minor update available for module easy_breadcrumb (2.0.11). Release: Bootstrap 8.x-3.42 — Minor update available for theme bootstrap (8.x-3.42). Release: Editoria11y Accessibility Checker 3.0.10 — Minor update available for module editoria11y (3.0.10). Release: Editoria11y Accessibility Checker 2.2.24 — Minor update available for module editoria11y (2.2.24). Release: Leaflet 10.4.13 — Minor update available for module leaflet (10.4.13). Release: Flag 5.1.1 — Minor update available for module flag (5.1.1). Release: MCP Sentinel 2.33.0 — Minor update available for module mcp_sentinel (2.33.0). Module Revived: Bootstrap 8.x-3.41 — Theme bootstrap updated after 6 months of inactivity (8.x-3.41). Security Coverage: Component Library — Module component_library now has official Drupal security advisory coverage.

Sticky

932 sites Security covered Drupal 11 · not 10

Part of the Sticky ecosystem · 6 projects

View on drupal.org

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



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
3 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core 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 Feb 3, 2023