Fade Through

Fade-through text swap for Remotion: one label, stat or short phrase fades out and the new one fades in after a tiny delay in the same spot, Material-style.

In Remotion, Fade Through is the cleanest way to swap one label or stat for another in the same spot: the old text fades out, and the new one fades in after a slight delay with a soft lift and a touch of blur. Use it for a changing label, a number update or a short phrase swap in a product demo, following Material's fade-through pattern.

Installation
$ pnpm dlx shadcn@latest add @remocn/fade-through

How to build this in Remotion

You don't need TransitionSeries with fade() or two overlapping Series.Sequences for this. Install the component and pass both texts:

bash
npx shadcn@latest add @remocn/fade-through

It is one component, not two sequences: the schedule in timeline.ts places the exit and the entrance, and each is an interpolate() over an Easing.bezier curve, clamped at both ends. Opacity, a few pixels of vertical lift, a 0.99 to 1 scale and a 2px blur all ride on those two curves.

Good to know

  • Length: 90 frames of motion at 30 fps (180 at 60 fps) with the default props. The motion itself is short: the old text leaves over frames 0 to 8 and the new text arrives over frames 9 to 22. The rest of the 90 frames is hold, and the timing does not stretch with the Sequence length, so a longer Sequence only holds the new text longer. The Usage example below is a 60 fps composition, so the numbers it hands to Remotion are doubled, see Frame rate.
  • Installs: remotion from npm, plus the remocn helpers glide, frame-rate, timeline. The shadcn CLI copies the source into your project.
  • Font: Geist Sans through the --font-geist-sans CSS variable, with a system sans fallback. The font is set inline, so change it in the copied file; a className font does not override an inline style.
  • Timing: there is no delay or duration prop, but the timing prop moves or stretches the two parts by id, for example timing={{ enter: { start: 20, stretch: 2 } }}. Counts are 30 fps frames.
  • The lift, scale and blur have no props to turn them off; they are the interpolate() ranges in the copied file.
  • It renders on a transparent background, so place it over your own scene or a Backdrop.

Usage

tsx
// src/Root.tsx
import { Composition, Sequence } from "remotion";
import { FadeThrough } from "@/components/remocn/fade-through";
 
const FadeThroughScene = () => (
  <>
    <Sequence durationInFrames={80}>
      <FadeThrough fromText="Calm transitions." toText="Fade through content." />
    </Sequence>
    <Sequence from={80} durationInFrames={80}>
      <FadeThrough fromText="Fade through content." toText="Focus shifts smoothly." />
    </Sequence>
  </>
);
 
export const RemotionRoot = () => (
  <Composition
    id="FadeThrough"
    component={FadeThroughScene}
    durationInFrames={160}
    fps={60}
    width={1280}
    height={720}
  />
);

Chaining two instances in back-to-back Sequences walks through a full phrase chain — the second transition reuses the first's toText as its fromText, so the text flows A → B → C. The component transitions from one phrase to another with a Material-style fade-through. The old phrase fades and lifts away, then the new phrase fades up into the same slot with a soft scale and blur settle—no directional meaning, good for same-level content swaps.

Chained example

This is the two-Sequence chain above rendered on an 80-frame timeline:

0:00 / 0:02
0s1s2s2.7s
0:00 / 0:02

With Backdrop

The component renders transparent — supply the background via Backdrop. It ships single-theme; edit the copied file to re-theme colors.

Pair with Backdrop to place the text inside a full-frame fill with a rounded, shadowed content frame:

tsx
import { Composition } from "remotion";
import { FadeThrough } from "@/components/remocn/fade-through";
import { Backdrop } from "@/components/remocn/backdrop";
 
const FadeThroughScene = () => (
  <Backdrop fill={{ type: "color", value: "#ffffff" }}>
    <FadeThrough
      fromText="Calm transitions."
      toText="Fade through content."
    />
  </Backdrop>
);
 
export const RemotionRoot = () => (
  <Composition
    id="FadeThrough"
    component={FadeThroughScene}
    durationInFrames={180}
    fps={60}
    width={1280}
    height={720}
  />
);

Props6

PropTypeDefault
fromTextrequired
string—

The outgoing phrase, shown first then fades out.

toTextrequired
string—

The incoming phrase that fades through to replace it.

fontSize
number72

Font size in pixels

fontWeight
number600

CSS font-weight

color
string"#171717"

Text color (any valid CSS color)

className
string—

Optional className passed to the wrapper

  • fromTextrequiredstring

    The outgoing phrase, shown first then fades out.

  • toTextrequiredstring

    The incoming phrase that fades through to replace it.

  • fontSizenumber

    Font size in pixels

    Default72

  • fontWeightnumber

    CSS font-weight

    Default600

  • colorstring

    Text color (any valid CSS color)

    Default"#171717"

  • classNamestring

    Optional className passed to the wrapper

Common questions

What's the cleanest way in Remotion to swap one label or stat for another in the same spot?

Install Fade Through with npx shadcn@latest add @remocn/fade-through and pass fromText and toText. The old text fades out, a two-frame gap passes, and the new text fades in, all in about 22 frames.

Can I change when the swap starts or how long it takes?

Yes, through the timing prop: exit and enter take start, length or stretch in 30 fps frames. You can also wrap the component in a Sequence with a from to delay the whole swap.

How does it differ from a TransitionSeries fade?

A TransitionSeries fade crossfades two whole scenes at once. Fade Through swaps text in one slot, lets the old text leave fully before the new one arrives, and adds a small lift so the change reads as new content.