1 slot open this monthBy the makers of shadcnregistryWe built shadcnregistry. Now we build your product.Book a callCheck availability
1 slot open this monthAI features?We build AI features into your product.Book a callCheck availability
1 slot open this month๐Ÿšจ Slop police๐Ÿšจ Slop police: we clean up vibe-coded apps.Report itReport your app
shadcnregistry
shadcnregistry
RegistryHealthInspect
Terms of ServicePrivacy Policy
  1. Registries
  2. sunui
  3. TOC Scrollspy

TOC Scrollspy

block

Table of contents that highlights the section being read, with a bar in the brand spot colour that slides between entries. It counts a section as read once its top passes an offset, lights the last entry at the bottom of the page, jumps smoothly on click and moves focus to the heading. Works on the window or a scroll container, with nested entries and a useScrollSpy hook for your own layout.

pnpm dlx shadcn@latest add "https://sunui.synvize.com/r/toc-scrollspy.json"
Premium blocks for shadcn/uiShadcnblocks.com ยท AffiliateExplore
  • framer-motion
  • utils
components/toc-scrollspy.tsx