@toc-cn
Niche/single-purpose · data updated 2026-07-28
A single-component shadcn/ui registry providing a documentation-style table of contents with IntersectionObserver scroll spy, an animated SVG tree indicator showing reading progress, and a mobile-first sticky collapsible header that expands into the full TOC. Supports nested headings with indented hierarchy. Installed via npx shadcn add from tocn.vercel.app. Built with React, Next.js, and Tailwind CSS. Free and open source. Use for: documentation sites, long-form content pages, or MDX-based docs built with Next.js that need a polished, animated in-page navigation sidebar.
Install
npx shadcn@latest add https://tocn.vercel.app/r/registry.jsonHealth
Components (1)
Preview
Live sandbox previews render component source client-side. Where a component can’t be rendered standalone, sh4dcn falls back to its source and install command.
@toc-cn · table-of-contents
npx shadcn@latest add https://tocn.vercel.app/r/table-of-contents.jsonView source