Grid Montage

One shot splits into a 2x2 grid, then a 3x3 grid cutting on the beat, then merges back. A free, MIT-licensed Remotion media layout.

Installation
$ pnpm dlx shadcn@latest add @remocn/grid-montage

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { GridMontage } from "@/components/remocn/grid-montage";
 
const GridMontageScene = () => (
  <GridMontage
    images={["/shots/1.jpg", "/shots/2.jpg", "/shots/3.jpg", "/shots/4.jpg"]}
    beat={14}
  />
);
 
export const RemotionRoot = () => (
  <Composition
    id="GridMontage"
    component={GridMontageScene}
    durationInFrames={340}
    fps={60}
    width={1280}
    height={720}
  />
);

A full-frame shot splits into a 2x2 grid of new scenes, grows into a 3x3 grid that swaps tiles on every beat, then merges back into one closing shot. Pass your own scenes (React nodes) or images, and set beat, the number of frames between cuts. With neither, it shows built-in mock tiles. It ships light and dark through theme.

The ground is a live gradients.sh shader (GshGround), installed with the component as @remocn/gsh. Pick another look with the ground preset prop.

Props15

PropTypeDefault
scenes
React.ReactNode[]—

Your own scenes as React nodes. Takes priority over images.

images
string[]—

Image URLs used as the tiles.

beat
number14

Frames per beat. The whole timeline scales with it.

radius
number14

Corner radius of the tiles, in px at 720 tall.

accent
string"#3B5BFD"

Accent color of the mock tiles.

background
string—

Solid fill in place of the gradient ground; pass "transparent" to drop it.

fontFamily
string"Instrument Sans"

Typeface for the built-in placeholder scenes. Load the font in your project first.

logo
React.ReactNode—

Replaces the remocn mark in the built-in placeholder scenes.

ground
GshPresetId—

Shader preset id for the animated background.

groundParams
Partial<GradientParams>—

Partial shader parameters that override the ground preset.

scale
number1

Size of the foreground around the frame's center; the background stays put.

delay
number0

Frames to hold the first frame before anything moves.

grain
booleantrue

Film grain over the scene.

speed
number1

Playback speed multiplier for the whole timeline.

theme
"dark" | "light""dark"

Color scheme. Ships light and dark.

  • scenesReact.ReactNode[]

    Your own scenes as React nodes. Takes priority over images.

  • imagesstring[]

    Image URLs used as the tiles.

  • beatnumber

    Frames per beat. The whole timeline scales with it.

    Default14

  • radiusnumber

    Corner radius of the tiles, in px at 720 tall.

    Default14

  • accentstring

    Accent color of the mock tiles.

    Default"#3B5BFD"

  • backgroundstring

    Solid fill in place of the gradient ground; pass "transparent" to drop it.

  • fontFamilystring

    Typeface for the built-in placeholder scenes. Load the font in your project first.

    Default"Instrument Sans"

  • logoReact.ReactNode

    Replaces the remocn mark in the built-in placeholder scenes.

  • groundGshPresetId

    Shader preset id for the animated background.

  • groundParamsPartial<GradientParams>

    Partial shader parameters that override the ground preset.

  • scalenumber

    Size of the foreground around the frame's center; the background stays put.

    Default1

  • delaynumber

    Frames to hold the first frame before anything moves.

    Default0

  • grainboolean

    Film grain over the scene.

    Defaulttrue

  • speednumber

    Playback speed multiplier for the whole timeline.

    Default1

  • theme"dark" | "light"

    Color scheme. Ships light and dark.

    Default"dark"