Shared Axis Y

Per-word hard-cut staircase transition for sharp editorial phrase swaps

Installation

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

Usage

// src/Root.tsx
import { Composition, Sequence } from "remotion";
import { SharedAxisY } from "@/components/remocn/shared-axis-y";

const SharedAxisYScene = () => (
  <>
    <Sequence durationInFrames={40}>
      <SharedAxisY fromText="Layered navigation." toText="Hierarchy made clear." />
    </Sequence>
    <Sequence from={40} durationInFrames={40}>
      <SharedAxisY fromText="Hierarchy made clear." toText="Depth with restraint." />
    </Sequence>
  </>
);

export const RemotionRoot = () => (
  <Composition
    id="SharedAxisY"
    component={SharedAxisYScene}
    durationInFrames={80}
    fps={30}
    width={1280}
    height={720}
  />
);

Each word in the outgoing phrase snaps off in a hard cut, then the incoming phrase's words snap on in a staircase pattern—no fade or motion, just a sharp editorial swap. 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.

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 { SharedAxisY } from "@/components/remocn/shared-axis-y";
import { Backdrop } from "@/components/remocn/backdrop";

const SharedAxisYScene = () => (
  <Backdrop fill={{ type: "color", value: "#ffffff" }}>
    <SharedAxisY
      fromText="Layered navigation."
      toText="Hierarchy made clear."
    />
  </Backdrop>
);

export const RemotionRoot = () => (
  <Composition
    id="SharedAxisY"
    component={SharedAxisYScene}
    durationInFrames={90}
    fps={30}
    width={1280}
    height={720}
  />
);

Props

PropTypeDefaultDescription
fromTextrequired
stringThe outgoing phrase, shown first then hard-cuts off word by word.
toTextrequired
stringThe incoming phrase that snaps in word by word.
fontSize
number72Font size in pixels
fontWeight
number600CSS font-weight
color
string"#171717"Text color (any valid CSS color)
className
stringOptional className passed to the wrapper