DocsSupportPricing
Roadmap (has updates coming soon)XFigma3.7K
Sign inGet All-Access
  1. Components
  2. Scrollspy
  3. Scrollspy Vertical Nav
DocsMarkdownShare

Shadcn Scrollspy Vertical Nav

Basic scrollspy. Built by composing Button, Scroll Area, Scrollspy. A free, open source shadcn scrollspy example you can install with npx shadcn@latest add @reui/c-scrollspy-1 and edit as your own code.

Basic scrollspy

For AI Agents

Hand your agent this brief or the ReUI MCP, not a screenshot. Free to install.

Best for: A vertical rail of 5 section buttons in a 150px column to the left of a 500px tall panel

When to use

  • A table of contents that marks which section of a long scrolling panel is in view
  • Jump links that scroll their content to the chosen section and keep that link highlighted

When not to use

  • Section links laid out in one row above the content: use the Scrollspy Horizontal Nav example
  • A bounded panel that only needs its own scrollbar, with no links following the content: use the Scroll Area component
  • A chat transcript that opens on the newest turn and follows replies as they stream: use the Message Scroller component
  • Account pages whose side links swap in one panel at a time, hiding the rest: use the Profile blocks

Agent notes

  • Replace nav, which renders both the button rail and the sections; every section body is an empty 350px bg-muted block
  • Without targetRef the spy tracks nothing and a click only marks its link without scrolling, so always pass one
  • targetRef can sit on a wrapper around a ScrollArea: the spy finds its scroll-area-viewport slot and tracks and scrolls that
  • history is on by default, so mount and every section change rewrite the URL hash with replaceState; pass false to leave it alone
Markdownhttps://reui.io/components/scrollspy/c-scrollspy-1.md
MCPget_example("c-scrollspy-1")
Installnpx shadcn@latest add @reui/c-scrollspy-1
Full index for agents:llms.txtReUI MCP setup

Shadcn Components in Scrollspy Vertical Nav

  • Button
  • Scroll Area
  • Scrollspy

About Shadcn Scrollspy Vertical Nav

Basic scrollspy. Built by composing Button, Scroll Area, Scrollspy. A free, open source shadcn scrollspy example you can install with npx shadcn@latest add @reui/c-scrollspy-1 and edit as your own code.

What You Can Build With Shadcn Scrollspy Vertical Nav

  • Composes Button, Scroll Area, Scrollspy, so it drops into any project already using those components.
  • Install it with the shadcn CLI: npx shadcn@latest add @reui/c-scrollspy-1
  • Open source and free, with the full source on this page to copy or adapt.

More Shadcn Scrollspy Examples

  • Horizontal Nav Basic scroll area

Related Shadcn Component Categories

  • Select

    Open-source shadcn select components for form selection, settings menus, and filter controls.

  • Separator

    Open-source shadcn separator components for content grouping, toolbar dividers, and section breaks.

  • Sheet

    Open-source shadcn sheet components for slide-over details, side panels, and task flows.

  • Sidebar

    Open-source shadcn sidebar components for app shells, collapsible side navigation, and dashboard layouts.

  • Signature Pad

    Open-source shadcn signature pad components for e-signature forms, agreements, and proof of delivery.

  • Skeleton

    Open-source shadcn skeleton components for loading placeholders, perceived performance, and content previews.

Frequently Asked Questions

When should I use Shadcn Scrollspy Vertical Nav?

Use it for a vertical rail of 5 section buttons in a 150px column to the left of a 500px tall panel.

Shadcn Scrollspy as a whole fits:

  • A table of contents that marks which section of a long scrolling panel is in view
  • Jump links that scroll their content to the chosen section and keep that link highlighted

For section links laid out in one row above the content, use the Scrollspy Horizontal Nav example. For a bounded panel that only needs its own scrollbar, with no links following the content, use the Scroll Area component. For a chat transcript that opens on the newest turn and follows replies as they stream, use the Message Scroller component. For account pages whose side links swap in one panel at a time, hiding the rest, use the Profile blocks.

How do I install Shadcn Scrollspy Vertical Nav?

Run npx shadcn@latest add @reui/c-scrollspy-1. The CLI copies the source into your project, so you own the code and can edit it freely.

Is Shadcn Scrollspy Vertical Nav free to use?

Yes. Every ReUI component example is open source and free for personal and commercial projects.

Which components does Shadcn Scrollspy Vertical Nav use?

It composes Button, Scroll Area, Scrollspy. The shadcn CLI installs those alongside the example.
NextHorizontal Nav

Start building with ReUI Pro today.

Every Pro block, every style, and every future addition, with one license for unlimited projects.

Get All-Access

From $249, once. Lifetime updates.

Application

  • App ShellAdded 4 new App Shell blocks
  • Auth
  • Card
  • Dashboard
  • Dialog
  • Empty State
  • Event Calendar
  • Flow
  • Form
  • Gantt
  • Kanban Board
  • List
  • Navbar
  • Onboarding
  • Profile
  • Rich Text Editor
  • Schedule
  • Settings
  • Sheet
  • Stats
  • Timeline
  • Whiteboard
  • Wizard

Data Grid

  • Base
  • AdvancedNew Advanced category with 3 Data Grid blocks
  • Columns
  • Drag & Drop
  • Editing
  • Expansion
  • Filtering
  • Grouping
  • Virtualization

Charts

  • Area Chart
  • Bar Chart
  • Composed Chart
  • Line Chart
  • Pie Chart
  • Radial Chart
  • Sparkline
  • Status Tracker

AI & Agents

  • AI Chat
  • Agent Activity

Solutions

  • Dev Ops
  • AI Ops
  • CRM
  • Agents
  • Analytics
  • Billing
  • Bookings
  • Files
  • Inventory
  • Users

Templates

  • E-commerce
  • SaaS
  • Dashboard
  • Landing
  • All templates

eCommerce

  • Category Card
  • Checkout
  • Comparison
  • Coupon
  • Filter Sidebar
  • Product Card
  • Product Detail
  • Product Grid
  • Receipt
  • Review
  • Shopping Cart
  • Wishlist
  • Shop Hero

Marketing

  • Blog
  • Compare
  • Contact
  • CTA
  • FAQ
  • Hero
  • How It Works
  • Pricing

Resources

  • Components
  • Blocks
  • Icons
  • MCP for Agents
  • Docs
  • Support
  • Pricing
  • Tailwind Plus Alternative
  • Roadmap(has updates coming soon)
  • AffiliateSoon

Legal

  • Privacy Policy
  • Terms & Conditions
  • License
  • Refunds
  • Cookies

© 2026 ReUI. All rights reserved.

3.7K