Overview
MCP Server
Custom Shadcn Scrollspy for React and Tailwind CSS. Dynamically highlights navigation to indicate current visible section in viewport during page scroll
import { Scrollspy } from "@/components/reui/scrollspy"<Scrollspy targetRef={
Browse 2 production-ready Shadcn Scrollspy components for dashboards, forms, and product UI. These examples follow the Radix UI implementation with accessible primitives from the Radix stack and stay fully compatible with Shadcn Create so radius, color, and typography match your configured theme.
Browse all 2 Shadcn Scrollspy components for copy-ready layouts, dashboards, and forms built with Tailwind CSS in the ReUI library.
Hand your agent this brief or the ReUI MCP, not a screenshot. Free to install.
When to use
When not to use
Agent notes
targetRef the spy tracks nothing and a click only marks its link without scrolling, so always pass onetargetRef can sit on a wrapper around a ScrollArea: the spy finds its scroll-area-viewport slot and tracks and scrolls thathistory is on by default, so mount and every section change rewrite the URL hash with replaceState; pass false to leave it alonehttps://reui.io/docs/components/radix/scrollspy.mdget_component("scrollspy")npx shadcn@latest add @reui/scrollspyThe main component that wraps the navigation links and manages the scroll spying logic.
Navigation links within Scrollspy should use these attributes to connect to sections:
The component adds data-active="true" to the link element when its corresponding section is active.