A muted video that scrubs frame-by-frame as the page scrolls past — frames are pre-decoded on load so scrubbing is instant even when the clip isn't keyframe-dense. Scroll up and down to move through the shot.
import ScrollVideo from '@crazygl/hero-scroll-video';
export default function Page() {
return (
<ScrollVideo
video="https://crazygl.com/samples/drone-1.mp4"
heading="Every frame, on scroll."
subheading="Scroll to move through the shot."
headingPosition="bottom-left"
/>
);
}For the smoothest fallback seeking, re-encode the clip with frequent keyframes, e.g.:
ffmpeg -i in.mp4 -g 6 -keyint_min 6 -sc_threshold 0 -c:v libx264 -crf 22 -an out.mp4video source, poster, and objectFit (cover / contain).smoothing playhead glide, reverse, and startAt / endAt to trim where the scroll maps in the clip.heading, subheading, headingPosition, textColor, scrim darkening, and fontFamily.npm install @crazygl/hero-scroll-videoThe component takes the same props you see in the live customizer on the right — every default ships poster-quality.
import ScrollVideo from '@crazygl/hero-scroll-video';
export default function Landing() {
return (
<ScrollVideo />
);
}The wrapper renders static HTML on the server and only initialises the canvas after hydration, so search engines see your copy.
// app/page.tsx — works in SSR-first frameworks (Next, Remix, Astro, etc.)
'use client';
import ScrollVideo from '@crazygl/hero-scroll-video';
export default function Page() {
return (
<section>
<ScrollVideo
heading="Say hi."
subheading="Your new hero."
/>
<article>
<h2>Welcome</h2>
<p>Your content keeps its own voice below the hero.</p>
</article>
</section>
);
}