Table of Contents
- from @toc-cn
- by toc-cn (https://github.com/lenxism/tocn)
In-page documentation table of contents with scroll-position spy, animated SVG tree indicator, and mobile sticky collapsible.
Install
New to shadcn? Set up your project
If your project already has a shadcn components.json, skip initialization. Otherwise, run this once from your project root.
pnpm dlx shadcn@latest initpnpm dlx shadcn@latest add @toc-cn/table-of-contentsRegistry dependencies5
- button
- collapsible
- item
- scroll-area
- separator