Installation
npx kinetic-ui-cli@latest add sticky-sequence-containerArchitecture
This component is the holy grail of cinematic web design. Instead of dealing with massive arrays of 150+ PNG sequences (which severely bloats bundles), it uses a much more performant method: Video Scrubbing.
We leverage framer-motion's useScroll to calculate exact page progress, map it to a 0-1 float, and manually set the HTMLVideoElement.currentTime to sync perfectly with the user's scroll wheel inside a sticky container.
Usage Guide
1. Import the Component
Import the component into your React or Next.js page:
import { StickySequence } from "@/components/creative/sticky-sequence";
2. Implementation Example
Render the component and customize its behavior by passing props:
import { StickySequence } from "@/components/creative/sticky-sequence";
export default function Example() {
return (
<div className="w-full flex items-center justify-center p-8">
<StickySequence
>
<div>Content goes here</div>
</StickySequence>
</div>
);
}