Back to Remotion

wipe()

packages/docs/docs/transitions/presentations/wipe.mdx

4.0.4612.3 KB
Original Source

A presentation where the entering slide slides over the exiting slide.

<Demo type="wipe" />

Example

tsx
import { AbsoluteFill } from "remotion";

const Letter: React.FC<{
  children: React.ReactNode;
  color: string;
}> = ({ children, color }) => {
  return (
    <AbsoluteFill
      style={{
        backgroundColor: color,
        opacity: 0.9,
        justifyContent: "center",
        alignItems: "center",
        fontSize: 200,
        color: "white",
      }}
    >
      {children}
    </AbsoluteFill>
  );
};
// ---cut---
import { linearTiming, TransitionSeries } from "@remotion/transitions";
import { wipe } from "@remotion/transitions/wipe";

const BasicTransition = () => {
  return (
    <TransitionSeries>
      <TransitionSeries.Sequence durationInFrames={40}>
        <Letter color="#0b84f3">A</Letter>
      </TransitionSeries.Sequence>
      <TransitionSeries.Transition
        presentation={wipe()}
        timing={linearTiming({ durationInFrames: 30 })}
      />
      <TransitionSeries.Sequence durationInFrames={60}>
        <Letter color="pink">B</Letter>
      </TransitionSeries.Sequence>
    </TransitionSeries>
  );
};

API

Takes an object with the following properties:

direction

One of from-left, from-top-left, from-top, from-top-right, from-right, from-bottom-right, from-bottom, from-bottom-left.

tsx
import { WipeDirection } from "@remotion/transitions/wipe";

const wipeDirection: WipeDirection = "from-left";

outerEnterStyle?<AvailableFrom v="4.0.84"/>

The style of the outer element when the scene is is entering.

outerExitStyle?<AvailableFrom v="4.0.84"/>

The style of the outer element when the scene is exiting.

innerEnterStyle?<AvailableFrom v="4.0.84"/>

The style of the inner element when the scene is entering.

innerExitStyle?<AvailableFrom v="4.0.84"/>

The style of the inner element when the scene is exiting.

Compatibility

<CompatibilityTable chrome firefox safari hideServers clientSideRendering serverSideRendering player studio />

See also