Code Diff Wipe
A patch landing line by line — removals collapse, additions open and write themselves in.
SceneScenes
code-diff-wipe30fps · 960×540
Install
$ npx remotion-ui@latest add code-diff-wipePass the file before and after the change. The scene diffs the two, then plays an apply front down the listing: removed lines redden, strike through and collapse as it passes; added lines open beneath it and write in. The header tallies the change as it goes.
Agent notes
Install first, then import the copied source component locally. AI guide →
Import
@/remotion/scenes/code-diff-wipe- Use when: full-frame scenes, overlays, cards, and reusable video sections.
- Customize: before, after, title, wipeSeconds, plus copied source for timing, layout, colors, and typography.
- Rule: do not import this component from the
remotion-uinpm package; it is copied into your project.
Usage
Example
import { CodeDiffWipe } from "@/remotion/scenes/code-diff-wipe";
<CodeDiffWipe before={before} after={after} title="render.ts" />API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| before | string | - | Source before the patch. |
| after | string | - | Source after the patch; the scene diffs the two. |
| title | string | "render.ts" | Filename on the window header. |
| wipeSeconds | number | 1.7 | Seconds the apply front takes to travel the file. |
| accentColor | string | "#E8B86D" | Apply front and glow color. |
| theme | "dark" | "light" | "dark" | Editor palette. |
| speed | number | 1 | Animation speed multiplier. |