RemotionUI

Card Flip

A whole-frame 3D flip that hands one scene off to the next on backface culling.

PrimitiveTransitions

transition-card-flip30fps · 960×540
Install
$ npx remotion-ui@latest add transition-card-flip

Each scene turns a half-circle in its own direction and the hand-off is done by backface culling: the outgoing face passes 90° at the midpoint and is hidden for the rest of the window, and the incoming one stays hidden until it crosses back through -90°. Clamping both at 90° instead leaves two faces parked edge-on, flickering against each other.

A flipping frame is zero pixels wide at the halfway point, so something is visible behind it. backdrop is that something — the outgoing layer paints it, since it sits under the incoming one for the whole cut. Set it to your scene background rather than leaving the page through.

shading darkens the face as it turns away, on cos() of the turn, which is exactly 1 at 0° and so leaves a settled scene untouched. dip recedes the card at the midpoint on a parabola that is exactly 1 at both ends.

Exports transitionCardFlip() and getTransitionCardFlipDuration() for use with TransitionSeries.Transition.

Requires @remotion/transitions. Run npx remotion add @remotion/transitions if not already installed.

Agent notes

Install first, then import the copied source component locally. AI guide →

Import
@/remotion/primitives/transition-card-flip
  • Use when: scene transitions and composition pacing.
  • Customize: durationInFrames, axis, perspective, backdrop, 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 { transitionCardFlip } from "@/remotion/primitives/transition-card-flip"; <TransitionSeries.Transition {...transitionCardFlip({ axis: "y" })} />

API Reference

PropTypeDescription
durationInFramesnumberTransition overlap length.
axis"y" | "x"y flips left-to-right like a page; x flips top over bottom.
perspectivenumberPerspective distance in px. Lower is a wider-angle flip.
backdropstringColour behind the card while it is edge-on. Without it the page background shows at the halfway frame.
shadingnumberPeak darkening of the face turning away, 0→1.
dipnumberHow far the card recedes at the halfway point.
variant"linear" | "spring" | "editorial"Timing curve.

Related