Platform
VaultVault
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
ButtonsPart of ProButtons
IconsPart of ProIcons
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
SavedPart of ProSaved
Support
DocumentationDocumentation
MCP serverMCP server
SettingsSettings
VaultScrollScroll Spy Nav
Dotted Locations GlobeBrowse all 182Tilted Word Marquee
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
Sign inSign in

Start free. The code for 15 components, no card needed.

Get 15 free

Scroll Spy Nav

This one is locked. Become a member to open the code for it and the rest of the Vault.

See plansTry the 15 free ones

What you'll need.

Install

  • gsap
  • ScrollTrigger
  • SplitText
  • CustomEase

Setup

npm i gsapregisterPlugin(ScrollTrigger, SplitText, CustomEase)

More like this

  • Pinned
  • Reveal
  • Progress
  • Split text
  • ScrollTrigger
  • Sticky

Features.

  • Chapter names pinned in a rail beside a long read, numbered 01, 02…
  • A 1px hairline slides and resizes to the name of the chapter you're reading
  • The active chapter is the last one past the middle of the window, and the last chapter takes over once its bottom is on screen
  • The first time a chapter scrolls in, its headline rises line by line through masks and its image settles from a soft zoom
  • Click a name to scroll to its chapter (smoothly through Lenis when the page has it)
  • At 991px and below the rail becomes a sticky strip across the top with edge fades; the hairline turns into an underline and the strip scrolls itself to keep the active name in view
  • Swipe the strip and it stays where you put it for a moment before following again
  • Respects prefers-reduced-motion: no line rise or zoom, and the hairline jumps instead of sliding
  • GSAP with ScrollTrigger, SplitText and CustomEase

How to get it right.

One link per chapter, in the same order

The script pairs the first [data-ssr-link] with the first [data-ssr-chapter], and so on. Give each chapter an id and point its link's href at it so the rail still works as plain anchors.

Keep names to one word

The rail column is a quarter of the width and the strip shows three or four names on a phone. Single words read best, and the hairline fits each label exactly.

One short headline per chapter

Each headline is one short statement. Lines are split once the page's fonts have loaded, and split again after a resize until they've risen, so the reveal always follows the real line breaks.

Eyebrow, second sentences and paired pictures are optional

It ships without them, and the styles are still in code.css. Add <p class="ssr_eyebrow"> at the top of the rail (it hides on the strip), <span class="ssr_soft"> after a headline's text for a quieter second sentence, or a .ssr_pair under a chapter's plate: two .ssr_side columns, each a .ssr_subhead and a .ssr_plate--small.

Give the last chapter some room

The last chapter becomes active once its bottom is on screen, so it lights up even when it's too short to reach the middle. Content after the section (a footer or a closing block) keeps the page from ending abruptly.

Variations.

  • Default — 0.5s hairline slide
  • Slow hairline — data-au-duration="1"
  • Snappy — data-au-duration="0.2"
  • Image-free chapters — leave out [data-ssr-image] and the plate; the headline still rises
  • Your colours — override the --ssr-* variables; --ssr-fill is the plate tint and --ssr-margin the outer side padding

Where it fits.

  • Long reads and guides — a step-by-step piece with a contents list that keeps up
  • Product tours — one feature per chapter with a big image each
  • Case studies — brief, process, outcome, in a rail you can jump around
  • Documentation landing pages — sections that show where you are

Frequently asked.

No. Clicks use Lenis when your page has it as window.__auLenis, and the browser's own scrollIntoView otherwise. ScrollTrigger works with either.

At 991px and below the rail becomes a sticky strip across the top: names in one scrolling row with fades at both ends, and an underline under the active name. The chapters run full width.

Yes, but in two places: the max-width: 991px block in the CSS and the same query at the top of the script.

Yes. Every section runs on its own; keep the chapter ids unique.

Yes: gsap, ScrollTrigger, SplitText and CustomEase, loaded before the script.

Related components.

NewPro

Arc Collage Hero

Scroll

Pro

Rising Card on Scroll

Scroll

Pro

Outline Paint Reveal

Scroll