Scroll spotlight
Copy lines that brighten as they cross a reading band, driving a sticky product visual.
API reference
Components
<ScrollSpotlight />
Provider for the shared active index and motion mode. Renders no DOM.
focusOffset?
Reading-band inset as a percentage of viewport height. Default 45.
dimmedOpacity?
Resting opacity for non-active copy lines. Default 0.4.
revealScale?
Scale the visual reveals from. Dropped under calm. Default 1.03.
initialItem?
Active item index before any line crosses the band. Default 0.
initialLine?
Active lineId before any scroll. Default "".
children?
Walkthrough children: copy column, rail, stage and visuals.
<SpotlightCopy />
Walkthrough copy line that dims until it crosses the reading band.
tag
Element to render.
lineId
Stable id for this line, unique across the walkthrough.
itemIndex
Item index this line belongs to.
id?
DOM id for aria-labelledby wiring.
className?
Merged onto the element.
children?
Line text.
<SpotlightRail />
Discrete step-dot column for the walkthrough.
count
Number of step dots (one per walkthrough item).
className?
Merged onto the <ol>.
<SpotlightStage />
Fixed 4:3 stage for product visuals.
children?
Stacked SpotlightVisuals or a single inline visual.
className?
Merged onto the stage.
<SpotlightVisual />
Product visual with sticky crossfade or inline scroll reveal.
index
Item index matched against the active index.
sticky?
Sticky crossfade (true) or inline scroll reveal (false).
className?
Merged onto the animating panel.
children?
Visual content, or a render function receiving reveal state.
Hooks
useSpotlight
Read active index and motion mode from the nearest ScrollSpotlight.
useSpotlight(): SpotlightStateReturns
activeItem
Active item index (0-based).
activeLine
Active line id from the last SpotlightCopy to cross the band.
fullMotion
True when full motion runs (sticky column and scroll tracking live).
calm
True under the calm reduced-motion strategy.
still
True under the off reduced-motion strategy.