Tailwind UI Pattern Registry for humans and agents

scroll filmstrip frame cinema parallax storytelling

Scroll Filmstrip

Details

Category
interactive
Complexity
medium
Browser
baseline-2024
Updated
2026-04-15
Animated Reduced Motion aria-hidden
scrollfilmstripframecinemaparallaxstorytelling

Parameters

Name Type Default Description
FRAME_COUNT number 20 Number of pre-rendered frames in the filmstrip
SCROLL_PER_FRAME number 60 How many px of scroll advance one frame

Pre-renders FRAME_COUNT canvas frames at mount time — each with a shifting color gradient, film-sprocket borders, and a frame counter. The frame() callback reads window.scrollY each tick and picks the corresponding pre-rendered bitmap via ctx.drawImage. Zero animation when the page isn’t scrolled; instant frame lookup (no redraw per frame).

With prefers-reduced-motion, stays locked on frame 0 — a static gradient, no scroll coupling.

Swap buildFrames() content with your own imagery (e.g. drawImage from a sprite sheet) to build a genuine scroll-scrubbed video player.