Sticky Navbar Scroll Behavior
Multi-state sticky header morphing 76px -> 72px -> 56px with top progress thread and Smart Hide.
Designed for product roadmaps, onboarding walkthroughs, and multi-stage narrative sections.
Sticky viewport lock keeps chapter panel crisp without layout shift.
Select milestone chapters directly or scrub timeline slider.
Zero external npm dependencies.
| Prop | Type | Default | Description | Effect |
|---|---|---|---|---|
| chapters | TimelineChapter[] | (required) | Ordered timeline milestone definitions. | Populates steps & detail cards. |
| progress | number | null | null | Optional controlled timeline progress fraction (0..1). | Drives spine height & chapter selection. |
| accentColor | string | '#536dfe' | Vertical progress bar and active step node tint. | Highlights active milestone state. |
Multi-state sticky header morphing 76px -> 72px -> 56px with top progress thread and Smart Hide.
01. Passive Listener Architecture: Measures container scrollTop ratio without layout polling.
02. Top Hairline Track: Maps progress cleanly across hardware scaleX transform.
03. SVG Dashoffset Geometry: Computes stroke circumference accurately from ring diameter.
04. Tabular Clarity: Prevents horizontal numeric wobble as percentages cross two digits.
05. End Checkpoint: Settles crisp at 100% upon reaching footer boundary.
Linear edge bar paired with tabular SVG stroke-dashoffset scroll completion indicator.
Two-column sticky reveal pairing scrollable documentation items with a stationary visual deck.