Duet Split
A split screen contrasts a slow grey before side with a crisp gradient after side, row by row. A free, MIT-licensed Remotion social video animation.
$ pnpm dlx shadcn@latest add @remocn/duet-splitUsage
// src/Root.tsx
import { Composition } from "remotion";
import { DuetSplit } from "@/components/remocn/duet-split";
const DuetSplitScene = () => (
<DuetSplit
beforeLabel="Before"
afterLabel="With us"
rows={[
{ before: "3 weeks", after: "1 day" },
{ before: "$12K", after: "$0" },
]}
/>
);
export const RemotionRoot = () => (
<Composition
id="DuetSplit"
component={DuetSplitScene}
durationInFrames={280}
fps={60}
width={1280}
height={720}
/>
);Two slabs slide in, labelled by beforeLabel and afterLabel. The grey side types out wobbly serif values row by row; the after side then pushes in and shows the crisp replacements, and a wordmark rises at the bottom. Pass rows as { before, after } pairs; it ships dark and light via theme. The closing wordmark is the Remocn logo, swap RemocnLogo in the copied file.
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 |
|---|---|---|
| beforeLabel | string"Before" Label above the grey before side. | |
| afterLabel | string"With remocn" Label above the gradient after side. | |
| rows | DuetRow[]— Paired values, one row each: the old way and the new way. | |
| stagger | number16 Frames between rows. | |
| hold | number24 Frames the last row holds before the after side takes over. | |
| accent | string"#3B5BFD" Color of the dot beside the after label. | |
| 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"Bricolage Grotesque" Typeface for the copy. Load the font in your project first. | |
| logo | React.ReactNode— Replaces the remocn mark. | |
| theme | "dark" | "light""dark" Color scheme. Ships dark and light. | |
| ground | GshPresetId— gradients.sh preset id for the animated ground. | |
| groundParams | Partial<GradientParams>— Overrides for the ground shader parameters. | |
| 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. | |
- beforeLabelstring
Label above the grey before side.
Default
"Before" - afterLabelstring
Label above the gradient after side.
Default
"With remocn" - rowsDuetRow[]
Paired values, one row each: the old way and the new way.
- staggernumber
Frames between rows.
Default
16 - holdnumber
Frames the last row holds before the after side takes over.
Default
24 - accentstring
Color of the dot beside the after label.
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
"Bricolage Grotesque" - logoReact.ReactNode
Replaces the remocn mark.
- theme"dark" | "light"
Color scheme. Ships dark and light.
Default
"dark" - groundGshPresetId
gradients.sh preset id for the animated ground.
- groundParamsPartial<GradientParams>
Overrides for the ground shader parameters.
- 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