ns-ui

Header Scroll Pill

A page header that morphs between a full-width quiet nav bar at the top and a floating centered pill once scrolled — spring-like width/radius/padding morph, section label roll, and a progress hairline, with hysteresis so it never flutters at the threshold and a fast upward scroll flicks it back open with overshoot.

Use when the header's silhouette itself should change on scroll, a full bar collapsing into a small centered floating pill with a rolling active-section label, and the component already owns scroll-linked section tracking with hysteresis and a fast-scroll-up overshoot; pick nav-condense-rail instead when the bar should keep its full-width shape and only change density.

Install

npx shadcn add https://design.helpmarq.com/r/header-scroll-pill.json
  • header
  • navigation
  • scroll
  • sticky
  • morph
  • pill
  • chrome

ns-ui / header-scroll-pill

Scroll to compress the bar into a pill; a fast upward scroll flicks it back open with overshoot.

Section 1 of 4

Intro

Fake page content for the scroll demo — the header above reacts to scroll position and this section's visibility.

Section 2 of 4

Work

Fake page content for the scroll demo — the header above reacts to scroll position and this section's visibility.

Section 3 of 4

Process

Fake page content for the scroll demo — the header above reacts to scroll position and this section's visibility.

Section 4 of 4

Contact

Fake page content for the scroll demo — the header above reacts to scroll position and this section's visibility.

Props

PropTypeDefaultDescription
wordmark?string
sections?ScrollIslandSection[]
activeId?stringid of the currently active section; the label rolls when this changes
className?string