Scrubbable Video Reveal
An Apple-style image sequence scrubbed frame by frame on canvas, following your hand as you scroll in either direction.
cinematic interactionsscrubbablevideorevealframer motion
Installation
Run the following command
~/your-project
pnpm dlx wensity@latest add scrubbable-video-reveal
Usage
Import ScrubbableVideoReveal from @/components/wensity/scrubbable-video-reveal and render it anywhere in your React or Next.js app. The source lands in your own repo, so every prop, class and animation below is yours to edit.
app/example.tsx
"use client";import { ScrubbableVideoReveal } from "@/components/wensity/scrubbable-video-reveal";const frames = Array.from({ length: 180 }, (_, i) =>`/sequence/frame-${String(i).padStart(4, "0")}.webp`);export function ScrubbableVideoRevealDemo() {return (<ScrubbableVideoRevealframes={frames}aspect="16 / 10"travel={3}framed/>);}
Props
| Prop | Type | Default | Description |
|---|---|---|---|
frames | string[] | - | Image sequence URLs in order. Prefer 100–200 compressed WebP / JPEG frames. |
aspect | string | "16 / 10" | Aspect ratio for the canvas wrapper. |
travel | number | 3 | Scroll travel multiplier. Total inner height is travel × 100vh. |
framed | boolean | true | Render the surrounding device frame. |
sticky | boolean | true | Pin the canvas via position sticky while the user scrolls. |
children | React.ReactNode | - | Optional content rendered above the canvas as overlays. |
useWindow | boolean | false | Use window scroll instead of an inner scrollable container. |
preload | "eager" | "lazy" | "eager" | Loading strategy for image preload. |
height | string | "640px" | Scroll container height when useWindow is false. |
