Directional Wipe

Slide one scene in while pushing the other out

Installation

$ pnpm dlx shadcn@latest add @remocn/directional-wipe

Usage

// src/Root.tsx
import { Composition } from "remotion";
import { DirectionalWipe } from "@/components/remocn/directional-wipe";

const DirectionalWipeScene = () => (
  <DirectionalWipe
    from={<SceneA />
);

export const RemotionRoot = () => (
  <Composition
    id="DirectionalWipe"
    component={DirectionalWipeScene}
    durationInFrames={90}
    fps={30}
    width={1280}
    height={720}
  />
);

Props

PropTypeDefaultDescription
from
ReactNodeThe outgoing scene. Falls back to a labeled colored panel.
to
ReactNodeThe incoming scene. Falls back to a labeled colored panel.
direction
"left" | "right" | "up" | "down""left"Direction the outgoing scene slides toward
transitionStart
numberdurationInFrames * 0.4Frame at which the wipe begins
transitionDuration
number20Length of the wipe in frames
className
stringOptional className for the outer container