Section Spy Nav

Sticky in-page navigation that follows your reading position: a shared pill springs between links as sections cross the reading line, a hairline fills with overall progress, and clicks glide and move focus into the section.

Try it: Scroll the page — the pill follows; click a link to glide.

Installation

Install with the shadcn CLI:

npx shadcn@latest add https://www.framekitui.live/r/section-spy-nav.json

Or, with the @framekit namespace registered: npx shadcn@latest add @framekit/section-spy-nav. You can also copy the source into components/ui/section-spy-nav.tsx (view on GitHub).

Usage

import { SectionSpyNav } from '@/components/ui/section-spy-nav'

Props

Component props
PropTypeDefaultNotes
sections{ id, label }[]work / about / journal / contactIds must exist in the DOM.
scrollContainerReact.RefObject<HTMLElement | null>windowScroll element when the component lives inside its own scroller.
orientation'horizontal' | 'vertical''horizontal'Layout.
value / onValueChangestring / (id) => void—Controlled active id.
aria-labelstring'On this page'Accessible nav name.
classNamestring—Extra classes merged onto the root.

Dependencies

  • motion
  • Project Lightbox

    Thumbnails open into a detail modal through a shared-element morph — artwork flies from its tile to the hero slot while copy staggers in. Focus trapped and restored, Esc closes, ←/→ browse.

  • Portfolio Footer

    A closing statement in giant display type — letters rise out of masks on scroll-in and a light follows the cursor across the glyphs — with a slow ribbon marquee, links and back-to-top.

  • Intro Preloader

    Greeting words flick by while a big counter climbs 0→100, then the ink curtain lifts with a trailing curve that flattens as it leaves and the page settles from a slight zoom. Skippable.

  • Availability Badge

    A status pill with a motion language per state: “open” sends two staggered radar ripples, “limited” breathes slowly, “booked” holds still. Copy swaps on a vertical spring; optional live local clock.

  • Reading Progress + TOC

    A spring-smoothed reading bar and a sticky table of contents that lights the section on screen, with a live “min left” estimate — made for long-form blog posts.

  • Copy Email Button

    A pill showing your address: the glyph morphs to a check, the label rolls to “Copied”, a ring pulses out and a live region confirms. Falls back to a select hint if the clipboard is blocked.

See all 35 Portfolio components