Components
VideoScroll
Scrubs through a video as the user scrolls, like Apple product pages.
Overview
<VideoScroll> scrubs through a video as the user scrolls -- like the AirPods Pro or iPhone product pages. Pair with overlay children for animated text on top of the video.
Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
src | string | -- | URL of the video file (MP4 recommended, no audio needed) |
duration | string | "300vh" | Scroll distance the video scrubbing spans |
pin | boolean | true | Whether to pin the video while scrubbing |
poster | string | -- | Poster image shown before the video loads |
children | ReactNode | (progress: number) => ReactNode | -- | Overlay content rendered on top of the video |
className | string | -- | CSS class for the outer spacer |
Behavior
- The video is
muted,playsInline, and never autoplays currentTimeis set directly from scroll progressprefers-reduced-motion: video stays on the poster frame