Spatial Push

A new scene physically presses the old one back into the frame

Installation

$ pnpm dlx shadcn@latest add @remocn/spatial-push

Usage

// src/Root.tsx
import { Composition } from "remotion";
import { SpatialPush } from "@/components/remocn/spatial-push";

const SpatialPushScene = () => (
  <SpatialPush
    from={<SceneA />
);

export const RemotionRoot = () => (
  <Composition
    id="SpatialPush"
    component={SpatialPushScene}
    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
"up" | "down" | "left" | "right""up"Direction the incoming scene enters from
transitionStart
numberdurationInFrames * 0.4Frame at which the push begins
transitionDuration
number30Easing window for Scene A's retreat, in frames
className
stringOptional className for the outer container