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
VaultNavigationExpanding Pill Nav
Arrow Swap ButtonBrowse all 182Cursor Push Tags
  • 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

Expanding Pill 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
  • CustomEase
  • ScrollTrigger

Setup

npm i gsapregisterPlugin(CustomEase, ScrollTrigger)

More like this

  • Menu
  • Header
  • Elastic
  • ScrollTrigger
  • Sticky
  • Morph

Features.

  • A glass capsule pinned top centre that always names the section in the middle of the screen
  • The number and name roll to the next section as you scroll, and retarget mid-roll on a fast flick
  • Click it and it springs open into the section list; pick one for its short line and a "Take me there" link
  • The capsule tweens its real width, height and corners, so the glass and text never stretch
  • One spring for every move: the overshoot is a set size whether the capsule grows a little or a lot
  • The leaving view fades, scales and blurs out while the new one settles in underneath
  • An orange mark slides (and stretches) to the current section in the open list
  • Take me there scrolls through your page's Lenis if it has one, natively otherwise
  • Escape steps back a level, a click outside or tabbing away closes, and a live region announces each view
  • The capsule tells screen readers which section you're in; lists and details too tall for the screen scroll
  • Respects prefers-reduced-motion: the capsule snaps and views cross-fade
  • GSAP with CustomEase and ScrollTrigger, plain CSS for the look

How to get it right.

One section per name

The capsule's label and the list are built from your [data-isl-section] elements: data-isl-label is the name, data-isl-copy the short line in the detail view. Keep a list row for each section, with data-isl-target set to its position from 0.

Keep names short

The idle capsule is 11em wide and the name doesn't wrap. One or two short words read best; longer names are cut off at the capsule edge.

Sections need height

Each section owns the label while it crosses the middle of the screen. Tall sections (a full screen or more) make the label change at calm, predictable moments.

Tune the spring with bounce

data-au-bounce sets the overshoot in em, not a ratio, so small and large moves feel the same. 0 swaps the elastic for a clean ease-out with no ring; above 1 it starts to wobble.

Variations.

  • Default — 0.65s, bounce 0.6
  • No ring — data-au-bounce="0"
  • Lively — data-au-bounce="1.1" and data-au-duration="0.8"
  • Light capsule — set --isl-glass to rgb(255 252 242 / 0.6), --isl-fg to a dark colour and --isl-border to a dark hairline
  • Your colours — override --isl-accent, --isl-muted and --isl-text on .isl_tour

Where it fits.

  • Property and architecture tours — rooms or spaces as full-screen sections
  • Long-form stories and case studies — chapters in the capsule, each with a one-line summary
  • Product pages — features as sections, with a quick way to jump between them

Frequently asked.

No. Take me there uses window.scrollTo with smooth scrolling when there's no Lenis. If your site runs Lenis, put the instance on window.lenis and the capsule scrolls through it.

Add a <section class="isl_section" data-isl-section data-isl-label="…" data-isl-copy="…"> and a matching list row with the next data-isl-target. The capsule's label strip builds itself from the sections.

Yes. Change top and left on .isl_pill (it's centred with translateX(-50%); drop that if you move it to a side), and on .isl_dock::before, the 44px tap target behind it.

The capsule is a button whose label includes the current section. Opening moves focus to the current row, picking a row moves it to Take me there, and Escape steps back with focus returning to where you came from. Take me there and a click outside return focus to the capsule; tabbing away closes it and leaves focus where you went.

Sections are just an image by default, because the capsule already names them. Add <span class="isl_section-index">01</span> and <h2 class="isl_section-title">Courtyard</h2> after the section's image. The styles are still in code.css. In React, add the same two lines to the sections in react.tsx.

Related components.

NewPro

Ink Spread Menu

Click

Pro

Folding Burger Nav

Scroll

Pro

Full-Screen Wipe Menu

Click