Word Gap Media
A video tile slots into the gap between "Launch all" and "of this". A free, MIT-licensed Remotion text animation.
$ pnpm dlx shadcn@latest add @remocn/word-gap-mediaUsage
// src/Root.tsx
import { Composition } from "remotion";
import { WordGapMedia } from "@/components/remocn/word-gap-media";
const WordGapMediaScene = () => (
<WordGapMedia before="Launch all" after="of this" images={["/shots/hero.jpg", "/shots/gallery.jpg"]} aspects={[0.8, 1.36]} captions={["Hero", "Gallery"]} />
);
export const RemotionRoot = () => (
<Composition
id="WordGapMedia"
component={WordGapMediaScene}
durationInFrames={336}
fps={60}
width={1280}
height={720}
/>
);A sentence is split around a gap and a media tile opens inside it, cycling through your images with progress bars and captions. By default it uses staticFile images that only exist in the Remocn repo, so pass your own images (public paths or full URLs). It ships light and dark.
The ground is a live gradients.sh shader (GshGround), installed with the component as @remocn/gsh. Pick another look with the ground preset prop.
Props16
| Prop | Type | Default |
|---|---|---|
| before | string"Launch all" Text before the gap. | |
| after | string"of this" Text after the gap. | |
| images | string[]DEFAULT_IMAGES Image paths or URLs cycled through the tile. | |
| aspects | number[]DEFAULT_ASPECTS Aspect ratio (width over height) for each image. | |
| captions | string[]DEFAULT_CAPTIONS Label shown for each image. | |
| stagger | number3 Frames between words as each side builds. | |
| accent | string— Accent colour (any CSS colour). | |
| ink | string— Text colour (any CSS colour). | |
| background | string— Solid fill in place of the gradient ground; pass "transparent" to drop it. | |
| fontFamily | string"Instrument Sans" 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 | "dark" | "light""dark" Colour scheme; ships light and dark. | |
| ground | GshPresetId— Gradient preset used for the backdrop. | |
| groundParams | Partial<GradientParams>— Overrides for the gradient preset parameters. | |
- beforestring
Text before the gap.
Default
"Launch all" - afterstring
Text after the gap.
Default
"of this" - imagesstring[]
Image paths or URLs cycled through the tile.
Default
DEFAULT_IMAGES - aspectsnumber[]
Aspect ratio (width over height) for each image.
Default
DEFAULT_ASPECTS - captionsstring[]
Label shown for each image.
Default
DEFAULT_CAPTIONS - staggernumber
Frames between words as each side builds.
Default
3 - accentstring
Accent colour (any CSS colour).
- inkstring
Text colour (any CSS colour).
- 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
"Instrument Sans" - 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"dark" | "light"
Colour scheme; ships light and dark.
Default
"dark" - groundGshPresetId
Gradient preset used for the backdrop.
- groundParamsPartial<GradientParams>
Overrides for the gradient preset parameters.