Sticky Timeline
Build a pinned section with step-by-step timeline indicators driven by scroll progress.
Overview
The sticky timeline pattern creates a pinned section with a vertical (or horizontal) timeline that fills as the user scrolls. Each step activates in sequence, with content crossfading to match the active step. This is a common pattern for feature walkthroughs, product tours, and process explainers.
Implementation
Use the <Scene> render prop to access scroll progress, then derive the active step and fill percentage from it.
CSS
Add these styles for the timeline track, fill bar, and dots.
Content crossfade
The content switching uses CSS transitions for a smooth crossfade. The active step has opacity: 1 and translateY(0), while inactive steps have opacity: 0 and translateY(20px). The first step uses position: relative to maintain layout height, while the rest are position: absolute so they stack.
If you need more control over the crossfade timing, you can use sub-progress values:
Customization tips
Horizontal timeline
Rotate the timeline to horizontal by swapping axes. Use width instead of height for the fill, and lay out dots with left instead of top:
Numbered steps
Replace the dots with numbered indicators:
Custom dot styles
Use a ring style for upcoming steps and a solid fill for completed ones:
Adding icons
Use step-specific icons inside each dot for a richer visual: