Navigation and disclosure
TableOfContents
Render a page-local heading index. The roadmap for long-form docs.
Curated demo
Reference
Render a page-local heading index. The roadmap for long-form docs.
- Use it only when the page has enough sections to justify navigation. A TOC for two headings is just silly.
- Generate items from page-owned headings or route content.
Example snippet
<TableOfContents items={tocItems} />