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"