RemotionUI

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-wipe

Pass 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-ui npm 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

PropTypeDescription
beforestringSource before the patch.
afterstringSource after the patch; the scene diffs the two.
titlestringFilename on the window header.
wipeSecondsnumberSeconds the apply front takes to travel the file.
accentColorstringApply front and glow color.
theme"dark" | "light"Editor palette.
speednumberAnimation speed multiplier.

Related