Playhead Reel

Timeline Scrub Gallery for React

A whole archive in one thin strip, with a playhead that walks along it as you scroll. Whatever's under the playhead opens into a loose collage, and the ruler below is a scrubber you can drag.

  • Gallery
  • Scroll
  • Timeline

Uses motion, clsx, tailwind-merge

Inspired by Maria Vasilyeva

Open in ChatGPTOpen in Claude
thumbHeight40px
scrollPerItem80px
reach2.5
skimtrue
stiffness170
damping32
<PlayheadReel />

The demo follows as you drag.

Take this demo to your coding agent.
Add this moment from KeyframeUI to our project and adapt it to our content.

Playhead Reel: A whole archive in one thin strip, with a playhead that walks along it as you scroll. Whatever's under the playhead opens into a loose collage, and the ruler below is a scrubber you can drag.

1. Install it:
   npx shadcn@latest add @keyframeui/playhead-reel-demo
   (If the CLI can't find @keyframeui, use https://keyframeui.com/r/playhead-reel-demo.json instead.)
   It adds the demo, components/playhead-reel-demo.tsx, and the component, components/ui/playhead-reel.tsx.

2. Make it ours: our copy, data, images and colors. Keep the structure the motion depends on. If we only need the effect, use <PlayheadReel> on its own.

3. These props set its feel. Change them before you change the file:
   - thumbHeight (default 40): Height of an item in the strip, in px.
   - scrollPerItem (default 80): Pixels of scroll it takes to move the playhead one item along.
   - reach (default 2.5): Roughly how many items on each side of the playhead open up. Lower keeps the collage tight; higher opens more of the strip at once.
   - skim (default true): Fold the collage flat into the strip while scrolling fast, so you can see where you're going, and open it again when you slow down. Off with reduced motion.
   - stiffness (default 170): Spring stiffness of the reel following the scroll. Higher keeps the playhead and strip close behind the scrollbar; lower lets them glide after it.
   - damping (default 32): Spring damping of the reel following the scroll. Lower lets it run a little past where you stopped and come back. Reduced motion follows the scroll exactly.

4. Don't change, in components/ui/playhead-reel.tsx:
   - Scrolling never renders React: one paint a frame (`frame.render`) writes each item's `transform`, `opacity` and `visibility` straight to its element.
   - Each item renders once at its open size and is scaled down to the strip with `scale(…)`, so painting never changes a width or height.
   - Later items stack on top (`--z` is the item's index), and a hovered item lifts above them all.
   - The stage is `sticky` inside a runway as tall as the strip's items times `scrollPerItem`, so the section pins while the runway scrolls past.
   - Under reduced motion the reel follows raw scroll progress, with no spring and no skim fold, and every jump is instant.
   Its timing is all in the TIMING block at the top of that file.

Docs: https://keyframeui.com/components/playhead-reel.md

Installation

Add the component on its own with the CLI, or copy the file in by hand.

The CLI writes components/ui/playhead-reel.tsx and installs motion, clsx and tailwind-merge. It needs the @keyframeui registry in components.json; add it once per project.

npx shadcn@latest add @keyframeui/playhead-reel

Examples

Finished sections built with Playhead Reel. Each one installs whole, with the component included.

Changelog

Six releases as live UI mockups rather than screenshots, so they stay sharp and follow your theme. The header shows the version and date, and a caption for the screen under the playhead. Tab to the playhead and use the arrow keys: Shift jumps a release.

Take this demo to your coding agent.
Add this moment from KeyframeUI to our project and adapt it to our content.

Playhead Reel: A whole archive in one thin strip, with a playhead that walks along it as you scroll. Whatever's under the playhead opens into a loose collage, and the ruler below is a scrubber you can drag.
This demo, Changelog: Six releases as live UI mockups rather than screenshots, so they stay sharp and follow your theme. The header shows the version and date, and a caption for the screen under the playhead. Tab to the playhead and use the arrow keys: Shift jumps a release.

1. Install it:
   npx shadcn@latest add @keyframeui/playhead-reel-changelog-demo
   (If the CLI can't find @keyframeui, use https://keyframeui.com/r/playhead-reel-changelog-demo.json instead.)
   It adds the demo, components/playhead-reel-changelog-demo.tsx, and the component, components/ui/playhead-reel.tsx.

2. Make it ours: our copy, data, images and colors. Keep the structure the motion depends on. If we only need the effect, use <PlayheadReel> on its own.

3. These props set its feel. Change them before you change the file:
   - thumbHeight (default 40): Height of an item in the strip, in px.
   - scrollPerItem (default 80): Pixels of scroll it takes to move the playhead one item along.
   - reach (default 2.5): Roughly how many items on each side of the playhead open up. Lower keeps the collage tight; higher opens more of the strip at once.
   - skim (default true): Fold the collage flat into the strip while scrolling fast, so you can see where you're going, and open it again when you slow down. Off with reduced motion.
   - stiffness (default 170): Spring stiffness of the reel following the scroll. Higher keeps the playhead and strip close behind the scrollbar; lower lets them glide after it.
   - damping (default 32): Spring damping of the reel following the scroll. Lower lets it run a little past where you stopped and come back. Reduced motion follows the scroll exactly.

4. Don't change, in components/ui/playhead-reel.tsx:
   - Scrolling never renders React: one paint a frame (`frame.render`) writes each item's `transform`, `opacity` and `visibility` straight to its element.
   - Each item renders once at its open size and is scaled down to the strip with `scale(…)`, so painting never changes a width or height.
   - Later items stack on top (`--z` is the item's index), and a hovered item lifts above them all.
   - The stage is `sticky` inside a runway as tall as the strip's items times `scrollPerItem`, so the section pins while the runway scrolls past.
   - Under reduced motion the reel follows raw scroll progress, with no spring and no skim fold, and every jump is instant.
   Its timing is all in the TIMING block at the top of that file.

Docs: https://keyframeui.com/components/playhead-reel.md

Travel Journal

A year of trips, one group each, in portrait and landscape. Each photo has its own caption, and the trip's dates and a day count sit above.

Take this demo to your coding agent.
Add this moment from KeyframeUI to our project and adapt it to our content.

Playhead Reel: A whole archive in one thin strip, with a playhead that walks along it as you scroll. Whatever's under the playhead opens into a loose collage, and the ruler below is a scrubber you can drag.
This demo, Travel Journal: A year of trips, one group each, in portrait and landscape. Each photo has its own caption, and the trip's dates and a day count sit above.

1. Install it:
   npx shadcn@latest add @keyframeui/playhead-reel-journal-demo
   (If the CLI can't find @keyframeui, use https://keyframeui.com/r/playhead-reel-journal-demo.json instead.)
   It adds the demo, components/playhead-reel-journal-demo.tsx, and the component, components/ui/playhead-reel.tsx.

2. Make it ours: our copy, data, images and colors. Keep the structure the motion depends on. If we only need the effect, use <PlayheadReel> on its own.

3. These props set its feel. Change them before you change the file:
   - thumbHeight (default 40): Height of an item in the strip, in px.
   - scrollPerItem (default 80): Pixels of scroll it takes to move the playhead one item along.
   - reach (default 2.5): Roughly how many items on each side of the playhead open up. Lower keeps the collage tight; higher opens more of the strip at once.
   - skim (default true): Fold the collage flat into the strip while scrolling fast, so you can see where you're going, and open it again when you slow down. Off with reduced motion.
   - stiffness (default 170): Spring stiffness of the reel following the scroll. Higher keeps the playhead and strip close behind the scrollbar; lower lets them glide after it.
   - damping (default 32): Spring damping of the reel following the scroll. Lower lets it run a little past where you stopped and come back. Reduced motion follows the scroll exactly.

4. Don't change, in components/ui/playhead-reel.tsx:
   - Scrolling never renders React: one paint a frame (`frame.render`) writes each item's `transform`, `opacity` and `visibility` straight to its element.
   - Each item renders once at its open size and is scaled down to the strip with `scale(…)`, so painting never changes a width or height.
   - Later items stack on top (`--z` is the item's index), and a hovered item lifts above them all.
   - The stage is `sticky` inside a runway as tall as the strip's items times `scrollPerItem`, so the section pins while the runway scrolls past.
   - Under reduced motion the reel follows raw scroll progress, with no spring and no skim fold, and every jump is instant.
   Its timing is all in the TIMING block at the top of that file.

Docs: https://keyframeui.com/components/playhead-reel.md

Props

groups Required

TypePlayheadReelGroup[]

What's on the reel, in order. Each group has a label for the ruler ("v2.4", "2019", "Lisbon") and its items. Groups sit apart in the strip, and the playhead pauses briefly in each gap.

src

Typestring

PlayheadReelItem: image URL. Images are fetched once the reel comes within a screen of the viewport.

alt

Typestring

PlayheadReelItem: alt text. The playhead handle also reads it out as it reaches the item.

aspect

TypenumberDefault4 / 3

PlayheadReelItem: width ÷ height. Sets how wide the item is in the strip and the shape it opens to. Mixing shapes gives the strip its rhythm.

content

TypeReactNode

PlayheadReelItem: your own markup instead of an image, laid out at the item's open size and scaled down with it. Use it for UI mockups, cards or video.

thumbHeight

TypenumberDefault40

Height of an item in the strip, in px.

scrollPerItem

TypenumberDefault80

Pixels of scroll it takes to move the playhead one item along.

reach

TypenumberDefault2.5

Roughly how many items on each side of the playhead open up. Lower keeps the collage tight; higher opens more of the strip at once.

skim

TypebooleanDefaulttrue

Fold the collage flat into the strip while scrolling fast, so you can see where you're going, and open it again when you slow down. Off with reduced motion.

stiffness

TypenumberDefault170

Spring stiffness of the reel following the scroll. Higher keeps the playhead and strip close behind the scrollbar; lower lets them glide after it.

damping

TypenumberDefault32

Spring damping of the reel following the scroll. Lower lets it run a little past where you stopped and come back. Reduced motion follows the scroll exactly.

header

TypeReactNode

Pinned above the reel, in the flow, so the collage never covers it. Put titles, counters and links here, driven by onActiveChange.

footer

TypeReactNode

Pinned below the ruler, in the flow.

onActiveChange

Type(active: { group: number; item: number }) => void

Called with the group and item under the playhead whenever they change, read from the smoothed position so it matches what's on screen. item counts from 0 within its group.

containerRef

TypeRefObject<HTMLElement | null>

Scroll container to track. Defaults to the window. The container must be positioned (e.g. relative).

stageClassName

TypestringDefault"h-dvh"

Classes for the pinned stage. Set its height and text color here: the playhead, ruler and labels are drawn in the text color.

itemClassName

Typestring

Classes for every item's frame, which defaults to rounded-lg with a soft shadow. Hovering an open item lifts it to the top of the pile.

className

Typestring

Extra classes for the outer section. Other section props pass through.