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.
$ pnpm dlx shadcn@latest add @remocn/fade-throughHow 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:
npx shadcn@latest add @remocn/fade-throughIt 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
Sequencelength, so a longerSequenceonly 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:
remotionfrom npm, plus the remocn helpersglide,frame-rate,timeline. The shadcn CLI copies the source into your project. - Font: Geist Sans through the
--font-geist-sansCSS variable, with a system sans fallback. The font is set inline, so change it in the copied file; aclassNamefont does not override an inline style. - Timing: there is no
delayordurationprop, but thetimingprop moves or stretches the two parts by id, for exampletiming={{ 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
// 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:
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:
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
| Prop | Type | Default |
|---|---|---|
| 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
Default
72 - fontWeightnumber
CSS font-weight
Default
600 - 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.
Related effects
- Per-Word Crossfade: the incoming phrase arrives word by word.
- Line-by-Line Slide: lines slide in and out with direction.
- Micro Scale Fade: a single calm entrance when there is no outgoing text.
- Value Swap: a price or number slides out and in with no layout shift.