Skip to content
Premium & Brand

Scroll Nav

Sticky sidebar that highlights the section in view as you scroll.

Import

tsx
import { ScrollNav } from "@cronus-ui/ui";
bash
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" >

Skip ScrollNavProps props table
PropTypeDefaultDescription
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>