PageTabs
Info
The PageTabs component creates sub-tabs within a page, allowing a single page to be split into multiple sub-pages. 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 users often encountered issues with incorrect static TOC extraction when using MDX fragments that include headers.
Rspress V2 introduces Dynamic TOC, which dynamically generates the TOC at runtime by monitoring DOM changes through MutationObserver. This ensures TOC accuracy and allows users to leverage the full flexibility of MDX fragments. This also makes the <PageTabs /> component possible.