An On this page list that follows the reader through the sections of a page or a scroll area, and the useScrollspy hook behind it.
API reference
Generated from the types. Every part also takes className.
Scrollspy
Also takes every prop of <nav> (except title).
- itemsrequired
ScrollspyItem[]- offset
number- root
RefObject<HTMLElement | null>The scrolling element, when it is not the window.- title
ReactNode = "On this page"- variant
"rail" | "pills" = "rail"rail: a line with the current section marked. pills: horizontal chips for a top bar.