Skip to content

Pass-in vs auto-fetch

vue
<TableOfContents :toc="page?.body?.toc" />
  • No extra Content query
  • Works the same on v2 and v3
  • path / collection are ignored for loading when toc is set

Auto-fetch

vue
<TableOfContents />
<!-- or -->
<TableOfContents path="/guide/intro" collection="docs" />
PropRole
pathDocument path (default: current route)
collectionContent v3 collection (default: module option / content)

If Content is not installed or the document has no TOC links, the component shows an empty/loading state (or title-only when isTitleShownWithNoContent is true).

Released under the MIT License.