Edit Ripple
Cause-and-effect text ripple for Remotion: a line like Change your mind is followed by render it again, whose words recolor in a ripple, one edit changing everything.
In Remotion, Edit Ripple shows one edit changing everything: a cause line such as "Change your mind," appears, the effect line "render it again." follows, and its words recolor in a ripple from left to right. Pairs play one after another, so it suits a cause-and-effect beat in a product video.
$ pnpm dlx shadcn@latest add @remocn/edit-rippleHow to build this in Remotion
You don't need per-character spring() calls or @remotion/noise. Install the component:
npx shadcn@latest add @remocn/edit-rippleOne scene with a schedule in timeline.ts that spaces the pairs across the composition. Each effect word recolors with interpolateColors; motion uses interpolate() and Easing curves, and the copy is measured before the first frame, held with delayRender.
Good to know
- Length: 196 frames of motion at 30 fps (392 at 60 fps) with the default props. That is the minimum for its
Sequence; add your own hold on top (the demo plays 230 frames). The Usage example below is a 60 fps composition, so the numbers it hands to Remotion are doubled, see Frame rate. - Default pairs: Change one word, / every scene follows. Swap the color, / every shot repaints. Change your mind, / render it again. To show only the last one, pass
pairs={[{ cause: "Change your mind,", effect: "render it again." }]}. - Length stretch: pairs are spaced to fill
durationInFrames. - Ripple color:
#5CF2B5in the dark theme and#12A06Bin the light theme;accentoverrides it. - Installs:
remotion,@remotion/google-fontsfrom npm, plus the remocn helpersglide,frame-rate,timeline. The shadcn CLI copies the source into your project. - Font: loads Epilogue itself through
@remotion/google-fonts. PassfontFamilyto use your own face, and load that font in your project.
Usage
// src/Root.tsx
import { Composition } from "remotion";
import { EditRipple } from "@/components/remocn/edit-ripple";
const EditRippleScene = () => <EditRipple pairs={[{ cause: "Change one word,", effect: "every scene follows." }, { cause: "Swap the color,", effect: "every shot repaints." }]} />;
export const RemotionRoot = () => (
<Composition
id="EditRipple"
component={EditRippleScene}
durationInFrames={460}
fps={60}
width={1280}
height={720}
/>
);Each pair appears as a cause line followed by an effect line, and the effect words recolor in a ripple from left to right; then the pair exits and the next pair follows. Pass pairs (cause and effect strings); it spaces the pairs to fit the composition length.
Props11
| Prop | Type | Default |
|---|---|---|
| pairs | EditRipplePair[]DEFAULT_PAIRS Cause and effect lines, played one pair at a time. | |
| accent | string— Color of the effect words as the ripple passes. | |
| ink | string— Text color; overrides the theme ink. | |
| background | string— Stage fill color; pass "transparent" to overlay your own footage. | |
| fontFamily | string"Epilogue" Typeface for the copy. The default is loaded for you; load any other font in your project first. | |
| fontWeight | number500 Weight of the copy. | |
| lag | number14 Frames the effect line trails the cause line. | |
| 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 multiplier for the whole timeline. | |
| theme | "dark" | "light""dark" Color scheme; ships dark and light. | |
- pairsEditRipplePair[]
Cause and effect lines, played one pair at a time.
Default
DEFAULT_PAIRS - accentstring
Color of the effect words as the ripple passes.
- inkstring
Text color; overrides the theme ink.
- backgroundstring
Stage fill color; pass "transparent" to overlay your own footage.
- fontFamilystring
Typeface for the copy. The default is loaded for you; load any other font in your project first.
Default
"Epilogue" - fontWeightnumber
Weight of the copy.
Default
500 - lagnumber
Frames the effect line trails the cause line.
Default
14 - 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 multiplier for the whole timeline.
Default
1 - theme"dark" | "light"
Color scheme; ships dark and light.
Default
"dark"
Common questions
How do I animate 'Change your mind, render it again.' so the second line ripples?
Install Edit Ripple with npx shadcn@latest add @remocn/edit-ripple and pass pairs with cause and effect strings.
Can it show one pair only?
Yes. Pass a single entry in pairs; the scene spaces it to the composition length.
Related effects
- Exactly: a yellow "Exactly." lands first, then "It's just code." completes the answer.
- Indent Steps: up to five lines rise in, each tabbing one step further right like indented code, then one word lights up.
- Which Means: a feature tag leads into a chain of consequences, each introduced by a hinge phrase.