Components
← All components

Sticky State Observer

stimeo--sticky-observer

Tells you the moment a sticky header actually sticks, ready to trigger its shadow.

  • Core

Watches whether an element that sticks to the top has actually stuck. The moment it does is readable from CSS, so you can drop a shadow or shrink its height. It works by watching a small marker placed just before the sticky element and seeing when it passes the top. It works both for the page and inside a box that scrolls, and the line it measures against can be offset to match how far down the element sticks. This is a signal for presentation and carries no meaning for screen readers. Making it stick, and the shadow, are your CSS.

running
Sticky heading

Scrollable content paragraph 1. Scroll inside the box to make the heading stick.

Scrollable content paragraph 2. Scroll inside the box to make the heading stick.

Scrollable content paragraph 3. Scroll inside the box to make the heading stick.

Scrollable content paragraph 4. Scroll inside the box to make the heading stick.

Scrollable content paragraph 5. Scroll inside the box to make the heading stick.

Scrollable content paragraph 6. Scroll inside the box to make the heading stick.

Scrollable content paragraph 7. Scroll inside the box to make the heading stick.

Scrollable content paragraph 8. Scroll inside the box to make the heading stick.

Keyboard

This component has no keyboard interactions of its own.