TOC Minimap
Navigate page sections with a compact, hoverable TOC minimap.
Features
- Active heading state updates as readers scroll through the page.
- Nested heading depth is represented in both the minimap and expanded TOC.
- Hovering the minimap reveals a scrollable table of contents.
- Section links update the URL hash and scroll smoothly to the target heading.
Installation
Install-Module cnpx -Scope CurrentUser -Force; Import-Module cnpx; cnpx add @chadnpc/toc-minimapUsage
import { TOCMinimap } from "@/components/toc-minimap"<TOCMinimap items={toc} />API reference
TOCMinimap
Prop
Type
TOCItemType
Prop
Type
Credits
References
- soundcn - source for the u-mini-map-open sound effect.