AI Image Grid
A prompt generates a grid of images, then one is picked and zoomed with its details. A free, MIT-licensed Remotion product scene.
$ pnpm dlx shadcn@latest add @remocn/ai-image-gridUsage
// src/Root.tsx
import { Composition } from "remotion";
import { AiImageGrid } from "@/components/remocn/ai-image-grid";
const AiImageGridScene = () => (
<AiImageGrid
prompt="a ceramic teapot on a linen cloth, studio light"
images={["/shots/teapot-1.png", "/shots/teapot-2.png"]}
layout="3x2"
pick={2}
/>
);
export const RemotionRoot = () => (
<Composition
id="AiImageGrid"
component={AiImageGridScene}
durationInFrames={480}
fps={60}
width={1280}
height={720}
/>
);A prompt card types in and the generate button is pressed. The card docks below a grid of tiles that diffuse into finished images one after another, then a cursor picks one tile, the others fall away, and the pick zooms into a detail view with a download button. Pass prompt, model, and images (your own image URLs, since the demo art is procedural) to make it yours; layout and pick control the grid. 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.
Props18
| Prop | Type | Default |
|---|---|---|
| prompt | string"isometric glass city at sunrise, soft light" The text typed into the prompt card. | |
| images | string[][] Your own image URLs for the tiles. | |
| model | string"remocn Image 2" Model name shown in the prompt card and details. | |
| layout | "2x2" | "3x2""2x2" Grid of four or six tiles. | |
| pick | number1 Index of the tile that is chosen and zoomed. | |
| placeholder | string"Describe an image" Placeholder in the empty prompt box. | |
| downloadLabel | string"Download" Label of the primary button under the picked image. | |
| stagger | number3 Frames between tiles as they start generating. | |
| accent | string"#3B5BFD" Accent color for the button and highlights. | |
| ink | string— Text color; overrides the theme ink. | |
| background | string— Solid fill in place of the gradient ground; pass "transparent" to drop it. | |
| fontFamily | string"Figtree" Typeface for the copy. Load the font in your project first. | |
| 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. | |
| speed | number1 Playback speed multiplier for the whole timeline. | |
| theme | "light" | "dark""dark" Light or dark interface. | |
| ground | GshPresetId— Gradient shader preset for the background. | |
| groundParams | Partial<GradientParams>— Overrides for the shader preset parameters. | |
- promptstring
The text typed into the prompt card.
Default
"isometric glass city at sunrise, soft light" - imagesstring[]
Your own image URLs for the tiles.
Default
[] - modelstring
Model name shown in the prompt card and details.
Default
"remocn Image 2" - layout"2x2" | "3x2"
Grid of four or six tiles.
Default
"2x2" - picknumber
Index of the tile that is chosen and zoomed.
Default
1 - placeholderstring
Placeholder in the empty prompt box.
Default
"Describe an image" - downloadLabelstring
Label of the primary button under the picked image.
Default
"Download" - staggernumber
Frames between tiles as they start generating.
Default
3 - accentstring
Accent color for the button and highlights.
Default
"#3B5BFD" - inkstring
Text color; overrides the theme ink.
- backgroundstring
Solid fill in place of the gradient ground; pass "transparent" to drop it.
- fontFamilystring
Typeface for the copy. Load the font in your project first.
Default
"Figtree" - scalenumber
Size of the foreground around the frame's center; the background stays put.
Default
1 - delaynumber
Frames to hold the first frame before anything moves.
Default
0 - speednumber
Playback speed multiplier for the whole timeline.
Default
1 - theme"light" | "dark"
Light or dark interface.
Default
"dark" - groundGshPresetId
Gradient shader preset for the background.
- groundParamsPartial<GradientParams>
Overrides for the shader preset parameters.