Imgcli

Scenes

Before After

Two versions in one frame: a handle sweeps across the picture uncovering the second version, overshoots, comes back and settles in the middle so both sides stay readable.

Make a video
Type
Animation
Duration
4.4s
Category
Scenes
Source
Imgcli

Install

$ npx @imgcli/cli add before-after

Two versions in one frame: a handle sweeps across the picture uncovering the second version, overshoots, comes back and settles in the middle so both sides stay readable.

Installation

npx @imgcli/cli add before-after

Usage

import { BeforeAfter } from "@/components/imgcli/before-after";

<BeforeAfter />

Render at 30 fps for 132 frames (4.4 seconds) with the default props. The preview uses a 960 × 540 canvas.

Use <BeforeAfter before="/old.png" after="/new.png" beforeLabel="Before" afterLabel="After" /> for 132 frames at 30 fps (BEFORE_AFTER_SECONDS). Both images share one framing.

PropTypeDefaultDescription
before
stringlightPageTwo images of the same framing; the slider uncovers `after` from the right.
after
stringdarkPage
beforeLabel
string"Light"
afterLabel
string"Dark"
aspect
number1.6Width ÷ height of both images.
title
string"One theme prop, both modes."
fontFamily
string—A face from the Imgcli font list, or any loaded CSS font stack.
accentColor
string—
theme
Partial<ImgcliTheme>—
mode
"light" | "dark"—
speed
number1

License

MIT. Free for personal and commercial use. Preserve the copyright and license notice.

Copyright (c) 2026 Ricky (Imgcli) <https://imgcli.com>

Frequently asked questions

How do I add Before After to a Remotion project?

Run npx @imgcli/cli add before-after in your Remotion project. The CLI copies the editable source into components/imgcli/ under your source root and installs its dependencies.

What is Before After?

Before After is a Remotion before after slider for React. Two versions in one frame: a handle sweeps across the picture uncovering the second version, overshoots, comes back and settles in the middle so both sides stay readable.

What do I need before using Before After?

Use Node.js 20.19 or newer and an existing Remotion project. Create one with npx create-video@latest. The component is free and MIT licensed.