components / toc

toc.

sticky table-of-contents with scroll-spy highlighting via IntersectionObserver. give it the page headings; the active row tracks scroll. behavior split into a headless useToc hook.

introduction

scroll the page; the active heading tracks into view.

installation

scroll the page; the active heading tracks into view.

usage

scroll the page; the active heading tracks into view.

api reference

scroll the page; the active heading tracks into view.

installation
bunx @justin06lee/chrome@latest add toc
usage
Scroll-spy
<Toc
headings={[
{ id: "intro", text: "introduction" },
{ id: "usage", text: "usage" },
]}
/>