Sync Grid

Video Comparison Grid for React

A grid of videos on one clock. Scrub any card and the rest follow it to the same moment. Stack them to flip between versions of a single frame, or drop one onto another to compare them side by side.

  • Video
  • Comparison
  • Scrubbing
  • Motion

Uses motion, clsx, tailwind-merge

Open in ChatGPTOpen in Claude
fps30fps
rippletrue
rippleSpeed1.00×
flightDuration0.50s
stagger0.035s
hinttrue(replays the demo)
<SyncGrid />

replays the demo when you let go.

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

Sync Grid: A grid of videos on one clock. Scrub any card and the rest follow it to the same moment. Stack them to flip between versions of a single frame, or drop one onto another to compare them side by side.
This demo, Easing: One motion played with four easings. Each card plots its curve with a dot riding it, and moves a card into its slot with the same value. Hover to scrub and watch the others ripple after, or stack them to flip between easings at the exact same moment.

1. Install it:
   npx shadcn@latest add @keyframeui/sync-grid-demo
   (If the CLI can't find @keyframeui, use https://keyframeui.com/r/sync-grid-demo.json instead.)
   It adds the demo, components/sync-grid-demo.tsx, and the component, components/ui/sync-grid.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 <SyncGrid> on its own.

3. These props set its feel. Change them before you change the file:
   - fps (default 30): Frame rate of the timeline: the step for ← and → (Shift: ten frames), and the frame every card lands on together once scrubbing stops.
   - ripple (default true): Followers chase the card you're scrubbing on springs that slow with each cell of distance, so time travels outward like a wave, and all land on the same frame within 150ms of the pointer stopping. Off with reduced motion.
   - rippleSpeed (default 1): How fast the followers catch up with the card you're scrubbing, as a multiple of the default pace. Lower lets time wash across the grid more slowly; the moment they all land on one frame moves with it.
   - flightDuration (default 0.5): Seconds a card takes to fly between the grid, the stack and a comparison. The stack's list, the compare frame and the divider wait for it in proportion.
   - stagger (default 0.035): Seconds of flight delay per cell away from the card that led, so the cards fly in one after another rather than all at once.
   - hint (default true): The first time the grid scrolls into view, a ghost cursor sweeps the first card once. Cancelled by any pointer or key; skipped with reduced motion.

4. Don't change, in components/ui/sync-grid.tsx:
   - Nothing renders React per frame: one `frame.update` loop moves the clock and the followers, cards bind motion values, and the time readouts write `textContent` directly.
   - Followers chase the leader on a critically damped spring stepped by hand in `tick`, keeping its velocity, and every card lands on the leader's exact frame once the clock has been still for `settle`.
   - A source shown in more than one card decodes once, in a hidden `<video>` in `parkRef`, and is drawn into each card's canvas from a ring of recent frames. It only draws, never reads pixels, so cross-origin videos work.
   - Modes change by flying the same card elements with `layout`, staggered by cell distance from `origin`. A stack swap fades the new front in over the old one, which keeps its z-index (`previous`) until the crossfade ends.
   - Reduced motion drops the ripple, the flights and the hint: the stage fades out, changes mode and fades back in.
   Its timing is all in the TIMING block at the top of that file.

Docs: https://keyframeui.com/components/sync-grid.md

Installation

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

The CLI writes components/ui/sync-grid.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/sync-grid

Examples

Finished sections built with Sync Grid. Each one installs whole, with the component included.

Model Output

One prompt, four fictional video models. The clips run 7 to 21 seconds and line up by percentage, so halfway is halfway in all of them. Stack them and move up and down to flip between outputs on the same frame.

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

Sync Grid: A grid of videos on one clock. Scrub any card and the rest follow it to the same moment. Stack them to flip between versions of a single frame, or drop one onto another to compare them side by side.
This demo, Model Output: One prompt, four fictional video models. The clips run 7 to 21 seconds and line up by percentage, so halfway is halfway in all of them. Stack them and move up and down to flip between outputs on the same frame.

1. Install it:
   npx shadcn@latest add @keyframeui/sync-grid-models-demo
   (If the CLI can't find @keyframeui, use https://keyframeui.com/r/sync-grid-models-demo.json instead.)
   It adds the demo, components/sync-grid-models-demo.tsx, and the component, components/ui/sync-grid.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 <SyncGrid> on its own.

3. These props set its feel. Change them before you change the file:
   - fps (default 30): Frame rate of the timeline: the step for ← and → (Shift: ten frames), and the frame every card lands on together once scrubbing stops.
   - ripple (default true): Followers chase the card you're scrubbing on springs that slow with each cell of distance, so time travels outward like a wave, and all land on the same frame within 150ms of the pointer stopping. Off with reduced motion.
   - rippleSpeed (default 1): How fast the followers catch up with the card you're scrubbing, as a multiple of the default pace. Lower lets time wash across the grid more slowly; the moment they all land on one frame moves with it.
   - flightDuration (default 0.5): Seconds a card takes to fly between the grid, the stack and a comparison. The stack's list, the compare frame and the divider wait for it in proportion.
   - stagger (default 0.035): Seconds of flight delay per cell away from the card that led, so the cards fly in one after another rather than all at once.
   - hint (default true): The first time the grid scrolls into view, a ghost cursor sweeps the first card once. Cancelled by any pointer or key; skipped with reduced motion.

4. Don't change, in components/ui/sync-grid.tsx:
   - Nothing renders React per frame: one `frame.update` loop moves the clock and the followers, cards bind motion values, and the time readouts write `textContent` directly.
   - Followers chase the leader on a critically damped spring stepped by hand in `tick`, keeping its velocity, and every card lands on the leader's exact frame once the clock has been still for `settle`.
   - A source shown in more than one card decodes once, in a hidden `<video>` in `parkRef`, and is drawn into each card's canvas from a ring of recent frames. It only draws, never reads pixels, so cross-origin videos work.
   - Modes change by flying the same card elements with `layout`, staggered by cell distance from `origin`. A stack swap fades the new front in over the old one, which keeps its z-index (`previous`) until the crossfade ends.
   - Reduced motion drops the ripple, the flights and the hint: the stage fades out, changes mode and fades back in.
   Its timing is all in the TIMING block at the top of that file.

Docs: https://keyframeui.com/components/sync-grid.md

Render Quality

One clip in four cards at 1/8, 1/4, 1/2 and full resolution. It decodes once and is drawn into each card, so all four always show the same frame. Drag Final onto Draft and switch to Difference: only the detail the draft lost lights up.

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

Sync Grid: A grid of videos on one clock. Scrub any card and the rest follow it to the same moment. Stack them to flip between versions of a single frame, or drop one onto another to compare them side by side.
This demo, Render Quality: One clip in four cards at 1/8, 1/4, 1/2 and full resolution. It decodes once and is drawn into each card, so all four always show the same frame. Drag Final onto Draft and switch to Difference: only the detail the draft lost lights up.

1. Install it:
   npx shadcn@latest add @keyframeui/sync-grid-render-demo
   (If the CLI can't find @keyframeui, use https://keyframeui.com/r/sync-grid-render-demo.json instead.)
   It adds the demo, components/sync-grid-render-demo.tsx, and the component, components/ui/sync-grid.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 <SyncGrid> on its own.

3. These props set its feel. Change them before you change the file:
   - fps (default 30): Frame rate of the timeline: the step for ← and → (Shift: ten frames), and the frame every card lands on together once scrubbing stops.
   - ripple (default true): Followers chase the card you're scrubbing on springs that slow with each cell of distance, so time travels outward like a wave, and all land on the same frame within 150ms of the pointer stopping. Off with reduced motion.
   - rippleSpeed (default 1): How fast the followers catch up with the card you're scrubbing, as a multiple of the default pace. Lower lets time wash across the grid more slowly; the moment they all land on one frame moves with it.
   - flightDuration (default 0.5): Seconds a card takes to fly between the grid, the stack and a comparison. The stack's list, the compare frame and the divider wait for it in proportion.
   - stagger (default 0.035): Seconds of flight delay per cell away from the card that led, so the cards fly in one after another rather than all at once.
   - hint (default true): The first time the grid scrolls into view, a ghost cursor sweeps the first card once. Cancelled by any pointer or key; skipped with reduced motion.

4. Don't change, in components/ui/sync-grid.tsx:
   - Nothing renders React per frame: one `frame.update` loop moves the clock and the followers, cards bind motion values, and the time readouts write `textContent` directly.
   - Followers chase the leader on a critically damped spring stepped by hand in `tick`, keeping its velocity, and every card lands on the leader's exact frame once the clock has been still for `settle`.
   - A source shown in more than one card decodes once, in a hidden `<video>` in `parkRef`, and is drawn into each card's canvas from a ring of recent frames. It only draws, never reads pixels, so cross-origin videos work.
   - Modes change by flying the same card elements with `layout`, staggered by cell distance from `origin`. A stack swap fades the new front in over the old one, which keeps its z-index (`previous`) until the crossfade ends.
   - Reduced motion drops the ripple, the flights and the hint: the stage fades out, changes mode and fades back in.
   Its timing is all in the TIMING block at the top of that file.

Docs: https://keyframeui.com/components/sync-grid.md

Redesign

Three versions of one product's site, built from markup, each scrolling with the clock while the same visitor moves and clicks through it. Drag 2026 onto 2019 and slide the divider: the old and new layouts sit at the same scroll point.

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

Sync Grid: A grid of videos on one clock. Scrub any card and the rest follow it to the same moment. Stack them to flip between versions of a single frame, or drop one onto another to compare them side by side.
This demo, Redesign: Three versions of one product's site, built from markup, each scrolling with the clock while the same visitor moves and clicks through it. Drag 2026 onto 2019 and slide the divider: the old and new layouts sit at the same scroll point.

1. Install it:
   npx shadcn@latest add @keyframeui/sync-grid-redesign-demo
   (If the CLI can't find @keyframeui, use https://keyframeui.com/r/sync-grid-redesign-demo.json instead.)
   It adds the demo, components/sync-grid-redesign-demo.tsx, and the component, components/ui/sync-grid.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 <SyncGrid> on its own.

3. These props set its feel. Change them before you change the file:
   - fps (default 30): Frame rate of the timeline: the step for ← and → (Shift: ten frames), and the frame every card lands on together once scrubbing stops.
   - ripple (default true): Followers chase the card you're scrubbing on springs that slow with each cell of distance, so time travels outward like a wave, and all land on the same frame within 150ms of the pointer stopping. Off with reduced motion.
   - rippleSpeed (default 1): How fast the followers catch up with the card you're scrubbing, as a multiple of the default pace. Lower lets time wash across the grid more slowly; the moment they all land on one frame moves with it.
   - flightDuration (default 0.5): Seconds a card takes to fly between the grid, the stack and a comparison. The stack's list, the compare frame and the divider wait for it in proportion.
   - stagger (default 0.035): Seconds of flight delay per cell away from the card that led, so the cards fly in one after another rather than all at once.
   - hint (default true): The first time the grid scrolls into view, a ghost cursor sweeps the first card once. Cancelled by any pointer or key; skipped with reduced motion.

4. Don't change, in components/ui/sync-grid.tsx:
   - Nothing renders React per frame: one `frame.update` loop moves the clock and the followers, cards bind motion values, and the time readouts write `textContent` directly.
   - Followers chase the leader on a critically damped spring stepped by hand in `tick`, keeping its velocity, and every card lands on the leader's exact frame once the clock has been still for `settle`.
   - A source shown in more than one card decodes once, in a hidden `<video>` in `parkRef`, and is drawn into each card's canvas from a ring of recent frames. It only draws, never reads pixels, so cross-origin videos work.
   - Modes change by flying the same card elements with `layout`, staggered by cell distance from `origin`. A stack swap fades the new front in over the old one, which keeps its z-index (`previous`) until the crossfade ends.
   - Reduced motion drops the ripple, the flights and the hint: the stage fades out, changes mode and fades back in.
   Its timing is all in the TIMING block at the top of that file.

Docs: https://keyframeui.com/components/sync-grid.md

Props

columns

TypenumberDefault2

Cards per row.

duration

Typenumber

Length of the timeline in seconds. Drives render items and playback. Videos of any length are matched to it by percentage, so a 10s and a 30s clip both reach their middle at the timeline's middle. Defaults to the first video's length, or 4 with no video.

fps

TypenumberDefault30

Frame rate of the timeline: the step for ← and → (Shift: ten frames), and the frame every card lands on together once scrubbing stops.

aspect

TypenumberDefault16 / 9

Width ÷ height of every card. Videos and sprites cover it.

ripple

TypebooleanDefaulttrue

Followers chase the card you're scrubbing on springs that slow with each cell of distance, so time travels outward like a wave, and all land on the same frame within 150ms of the pointer stopping. Off with reduced motion.

rippleSpeed

TypenumberDefault1

How fast the followers catch up with the card you're scrubbing, as a multiple of the default pace. Lower lets time wash across the grid more slowly; the moment they all land on one frame moves with it.

flightDuration

TypenumberDefault0.5

Seconds a card takes to fly between the grid, the stack and a comparison. The stack's list, the compare frame and the divider wait for it in proportion.

stagger

TypenumberDefault0.035

Seconds of flight delay per cell away from the card that led, so the cards fly in one after another rather than all at once.

stackable

TypebooleanDefaulttrue

Show the Stack button. Stacked, the cards fan into one frame: x scrubs, y (or ↑ ↓, or the list beside it) picks the variant in front, which swaps in a 100ms crossfade.

comparable

TypebooleanDefaulttrue

Drag a card onto another (long-press on touch, or the Compare button on a focused card) to merge them into one frame with a draggable divider, or into Difference, where identical pixels go black.

hint

TypebooleanDefaulttrue

The first time the grid scrolls into view, a ghost cursor sweeps the first card once. Cancelled by any pointer or key; skipped with reduced motion.

onTimeChange

Type(seconds: number, progress: number) => void

Called whenever the clock moves, with the time in seconds and as 0–1. Runs every frame while playing or scrubbing.

cardClassName

Typestring

Classes for every card, such as its corner radius. Defaults to rounded-xl.

className

Typestring

Extra classes for the outer element. Other div props pass through.

item.label Required

Typestring

SyncGridItem: names the card on screen, in the stack's list, and to screen readers.

item.render

Type(progress: MotionValue<number>) => ReactNode

SyncGridItem: draws the card from the clock with no assets. Gets this card's progress, 0–1, as a MotionValue; bind it to motion styles or useTransform so nothing re-renders per frame.

item.src

Typestring

SyncGridItem: a video. Loads once the grid is within a screen of the viewport. Cards that share a src decode it once and draw the same frame.

item.poster

Typestring

SyncGridItem: shown until the video's first frame is ready.

item.sprite

Type{ url: string; columns: number; rows: number; frames?: number }

SyncGridItem: a sheet of preview frames, left to right then top to bottom, used while scrubbing. With src, the video only loads to play.

item.resolution

TypenumberDefault1

SyncGridItem: 0–1. Draws the video at that share of its own pixels (1/8 of 1280 × 720 is 160 × 90) and scales it up pixelated.

item.children

TypeReactNode

SyncGridItem: overlay content such as stat chips, over the media. Position it yourself; it takes no pointer events and hides in Difference view.

item.className

Typestring

SyncGridItem: classes for this card.