Shared Axis Z

Depth-style zoom text transition: the old phrase scales up and blurs away while the new one grows from smaller into focus, moving from a broad idea to a focused one. A free, MIT-licensed Remotion text animation.

In Remotion, Shared Axis Z is a depth-style zoom transition between two lines of text: the old phrase scales up, blurs and fades as if passing the camera, while the new phrase grows from a smaller scale into focus. Use it to move from a broad idea to a focused one.

Installation
$ pnpm dlx shadcn@latest add @remocn/shared-axis-z

How to make a scale-based zoom transition between text in Remotion

A scale-based transition between two lines of text that feels like zooming from broad context into a focused point, with depth, is one component. You do not need a custom TransitionSeries presentation or a full-frame zoom such as zoomBlur or crossZoom from @remotion/transitions; this swaps the text inside one scene:

bash
npx shadcn@latest add @remocn/shared-axis-z
  • fromText scales from 1 to 1.06 with a slight blur and fades out over 11 frames; toText starts 9 frames in and scales from 0.9 to 1 while its blur clears, over 16 frames. Both use interpolate() with Material-style Easing.bezier curves.
  • The swap runs at the start of its Sequence and is done by frame 25 (at 30 fps); the new line holds for the rest. Chain several in Sequences for A → B → C.
  • speed scales the whole swap, and timing moves or stretches the out and in phases separately. The scale amounts and easing are constants in the copied file.
  • The font is Geist Sans through the --font-geist-sans CSS variable, set inline; change it in the copied file. The background is transparent.

For a sideways topic change without depth use Shared Axis Y.

Good to know

  • Length: 90 frames at 30 fps (180 at 60 fps) including the hold; the zoom itself takes the first 25. The Usage example below is a 60 fps composition, so its Sequence lengths are doubled. The component's own props counted in frames stay in 30 fps frames at any frame rate, see Frame rate.

Usage

tsx
// src/Root.tsx
import { Composition, Sequence } from "remotion";
import { SharedAxisZ } from "@/components/remocn/shared-axis-z";
 
const SharedAxisZScene = () => (
  <>
    <Sequence durationInFrames={80}>
      <SharedAxisZ fromText="Zooming between states." toText="Elevate and settle." />
    </Sequence>
    <Sequence from={80} durationInFrames={80}>
      <SharedAxisZ fromText="Elevate and settle." toText="Scale with purpose." />
    </Sequence>
  </>
);
 
export const RemotionRoot = () => (
  <Composition
    id="SharedAxisZ"
    component={SharedAxisZScene}
    durationInFrames={160}
    fps={60}
    width={1280}
    height={720}
  />
);

A Material shared-axis (Z) depth swap — the old phrase scales up and blurs away as it fades, while the new phrase rises from a smaller scale and sharpens into focus. Chaining two in Sequence flows A → B → C.

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 { SharedAxisZ } from "@/components/remocn/shared-axis-z";
import { Backdrop } from "@/components/remocn/backdrop";
 
const SharedAxisZScene = () => (
  <Backdrop fill={{ type: "color", value: "#ffffff" }}>
    <SharedAxisZ
      fromText="Zooming between states."
      toText="Elevate and settle."
    />
  </Backdrop>
);
 
export const RemotionRoot = () => (
  <Composition
    id="SharedAxisZ"
    component={SharedAxisZScene}
    durationInFrames={180}
    fps={60}
    width={1280}
    height={720}
  />
);

Props7

PropTypeDefault
fromTextrequired
string—

The outgoing phrase, scales up and fades away.

toTextrequired
string—

The incoming phrase, rises from a smaller scale into focus.

fontSize
number72

Font size in pixels

fontWeight
number600

CSS font-weight

color
string"#171717"

Text color (any valid CSS color)

speed
number1

Playback speed multiplier for the whole animation

className
string—

Optional className passed to the wrapper

  • fromTextrequiredstring

    The outgoing phrase, scales up and fades away.

  • toTextrequiredstring

    The incoming phrase, rises from a smaller scale into focus.

  • fontSizenumber

    Font size in pixels

    Default72

  • fontWeightnumber

    CSS font-weight

    Default600

  • colorstring

    Text color (any valid CSS color)

    Default"#171717"

  • speednumber

    Playback speed multiplier for the whole animation

    Default1

  • classNamestring

    Optional className passed to the wrapper