Need help with theia-sticky-sidebar?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

516 Stars 195 Forks MIT License 61 Commits 16 Opened issues


Glues your website's sidebars, making them permanently visible while scrolling.

Services available


Need anything else?

Contributors list

Theia Sticky Sidebar

A JavaScript library that glues your website's sidebars (or any vertical column for that matter), making them permanently visible when scrolling up and down. Useful when a sidebar is too tall or too short compared to the rest of the content. Works with virtually any design and supports multiple sidebars.


Theia Sticky Sidebar for WordPress

Also available as a premium WordPress plugin that comes with a user-friendly admin panel and supports a plethora of themes out-of-the-box.


3 columns example

4 columns example

Bootstrap 4 example

Foundation example



If you are using Bower as your package manager:

bower install theia-sticky-sidebar


If you are using NPM as your package manager:

npm install theia-sticky-sidebar


Your website's HTML structure has to be similar to this in order to work:


Note that the inner "theiaStickySidebar" divs are optional, but highly recommended. If you don't supply them yourself, the script will create them for you, but this can be problematic if you're using ads or iframes, since they will be moved around in the DOM and as a result will get reloaded.

Note: Make sure to use

 in your page, otherwise you might run into weird issues.

For the above example, you can use the following JavaScript:


Theia Sticky Sidebar uses the CSS Element Queries library to detect when your sidebars change height, so that it can recalculate their positions. This can happen if you are using an accordion, for example.

You can choose not to include the

script in your page, in which case Theia Sticky Sidebar will continue to function (possibly even a bit smoother) but will not automatically detect height changes.



The sidebar's container element. If not specified, it defaults to the sidebar's parent.


An additional top margin in pixels. Defaults to 0.


An additional bottom margin in pixels. Defaults to 0.


Updates the sidebar's height. Use this if the background isn't showing properly, for example. Defaults to true.


The sidebar returns to normal if its width is below this value. Useful for responsive designs. Defaults to 0.


Try to detect responsive layouts automatically and disable the sticky functionality on smaller screens. More exactly, it detects when the container and the sidebar are moved one on top of the other, instead of showing up side-by-side. Defaults to true.


The sidebar must have a non-static

, as the inner sticky-sidebar uses
position: absolute
. Defaults to relative.


Events are binded using a namespace, so that you may unbind them later on without affecting others. Defaults to TSS.


Stock photos courtesy of

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.