Scroll Nav
Sticky sidebar that highlights the section in view as you scroll.
Import
import { ScrollNav } from "@cronus-ui/ui";
npx cronus-ui add scroll-nav
Examples
API Reference
Generated from the component's exported types.
ScrollNavProps
Extends Omit< ComponentPropsWithoutRef<"div">, "title" | "onAnimationStart" | "onAnimationEnd" | "onDrag" | "onDragStart" | "onDragEnd" >
| Prop | Type | Default | Description |
|---|---|---|---|
ref | Ref<HTMLDivElement> | — | — |
title | string | "Terms & Conditions" | Page heading. |
terms* | ScrollNavTerm[] | — | — |
viewportRef | RefObject<HTMLElement | null> | — | Scroll container. When set, the spy observes this box instead of the viewport — needed when the nav lives inside a nested scroller (docs preview). |
labels | Partial<ScrollNavLabels> | — | — |