Document navigation
Document contents with the current section, reading progress, and compact navigation.
Loading interactive example
Use DocumentNavigation beside a long document with stable heading IDs. Pass container for a nested scroll area. Native fragment links remain available before hydration; current-section and progress tracking start in the browser. Keep heading scroll margins clear of sticky headers.
API
| Member | Type | Kind | Required | Default |
|---|---|---|---|---|
container | HTMLElement | null | prop | No | null |
headings | readonly DocumentHeading[] | prop | Yes | |
title | string | prop | Yes |
Source
Loading source