PageTabs experimental
Info
The PageTabs component creates sub-tabs within a page so a single page can be split into multiple views. To keep anchors and the TOC correct, each page may contain exactly one PageTabs.
API
How it works
Basic usage
docs/guide/getting-started.mdx
Using MDX fragments
It's recommended to use MDX fragments to split a page into multiple sub-pages.
docs/guide/getting-started.mdx
Dynamic TOC
Based on extensive feedback from V1 users, we found that static TOC extraction often failed when using MDX fragments that include headers.
Rspress V2 introduces Dynamic TOC, which generates the TOC at runtime by monitoring DOM changes through MutationObserver. This keeps the TOC accurate while letting you fully leverage MDX fragments, making the <PageTabs /> component possible.