On Approach

A fixed lead phrase stays while a time phrase swaps down to the closing word today. A free, MIT-licensed Remotion text animation.

Installation
$ pnpm dlx shadcn@latest add @remocn/on-approach

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { OnApproach } from "@/components/remocn/on-approach";
 
const OnApproachScene = () => (
  <OnApproach lead="Wheels up" steps={["in June.", "next week.", "tomorrow.", "today."]} interval={30} />
);
 
export const RemotionRoot = () => (
  <Composition
    id="OnApproach"
    component={OnApproachScene}
    durationInFrames={320}
    fps={60}
    width={1280}
    height={720}
  />
);

The lead phrase holds still while each entry in steps swaps in, counting closer to the last one. Pass lead, steps and interval to set the countdown. It ships in light and dark through the theme prop.

Props12

PropTypeDefault
lead
string"Wheels up"

Phrase that stays in place.

steps
string[]—

Time phrases swapped in order.

interval
number30

Frames between swaps.

swapAt
number36

Frame of the first swap.

accent
string—

Accent color override; falls back to the theme accent.

ink
string—

Text color; overrides the theme ink.

background
string—

Background color override; falls back to the theme background.

fontFamily
string"Red Hat Display"

Typeface for the copy. Load the font in your project first.

scale
number1

Size of the foreground around the frame's center; the background stays put.

delay
number0

Frames to hold the first frame before anything moves.

speed
number1

Playback speed multiplier for the whole timeline.

theme
"dark" | "light""dark"

Ships light and dark; picks the palette.

  • leadstring

    Phrase that stays in place.

    Default"Wheels up"

  • stepsstring[]

    Time phrases swapped in order.

  • intervalnumber

    Frames between swaps.

    Default30

  • swapAtnumber

    Frame of the first swap.

    Default36

  • accentstring

    Accent color override; falls back to the theme accent.

  • inkstring

    Text color; overrides the theme ink.

  • backgroundstring

    Background color override; falls back to the theme background.

  • fontFamilystring

    Typeface for the copy. Load the font in your project first.

    Default"Red Hat Display"

  • scalenumber

    Size of the foreground around the frame's center; the background stays put.

    Default1

  • delaynumber

    Frames to hold the first frame before anything moves.

    Default0

  • speednumber

    Playback speed multiplier for the whole timeline.

    Default1

  • theme"dark" | "light"

    Ships light and dark; picks the palette.

    Default"dark"