Focus Pan Text

Earlier lines stack up blurred as focus pans down line by line to a final sentence and a small toolbar. A free, MIT-licensed Remotion text animation.

Installation
$ pnpm dlx shadcn@latest add @remocn/focus-pan-text

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { FocusPanText } from "@/components/remocn/focus-pan-text";
 
const FocusPanTextScene = () => (
  <FocusPanText
    lines={["The scan is clean.", "All 48 checks passed.", "You're ready to launch."]}
    meta="Just now"
  />
);
 
export const RemotionRoot = () => (
  <Composition
    id="FocusPanText"
    component={FocusPanTextScene}
    durationInFrames={338}
    fps={60}
    width={1280}
    height={720}
  />
);

Each line is read in turn while earlier lines fall out of focus above; focus lands on the final line, the accent word lights up and a toolbar with meta text appears. Pass lines and accentWord; it ships light and dark through theme.

The ground is a live gradients.sh shader (GshGround), installed with the component as @remocn/gsh. Pick another look with the ground preset prop.

Props16

PropTypeDefault
lines
string[]DEFAULT_LINES

Lines shown in order; the last one is the payoff

accentWord
string—

Word in the last line shown in the accent color

meta
string"Just now"

Text in the toolbar after the final line

accent
string—

Color of the accent word

ink
string—

Text color override

theme
"dark" | "light""dark"

Ships light and dark palettes

ground
GshPresetId—

Gradient ground preset id

groundParams
Partial<GradientParams>—

Partial gradient parameters to tune the ground

firstHold
number30

Frames the first line is held before panning on

stagger
number3

Frames between the payoff line's words rising.

fontWeight
number400

Weight of the lines.

background
string—

Solid fill in place of the gradient ground; pass "transparent" to drop it.

fontFamily
string"Inter Tight"

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.

  • linesstring[]

    Lines shown in order; the last one is the payoff

    DefaultDEFAULT_LINES

  • accentWordstring

    Word in the last line shown in the accent color

  • metastring

    Text in the toolbar after the final line

    Default"Just now"

  • accentstring

    Color of the accent word

  • inkstring

    Text color override

  • theme"dark" | "light"

    Ships light and dark palettes

    Default"dark"

  • groundGshPresetId

    Gradient ground preset id

  • groundParamsPartial<GradientParams>

    Partial gradient parameters to tune the ground

  • firstHoldnumber

    Frames the first line is held before panning on

    Default30

  • staggernumber

    Frames between the payoff line's words rising.

    Default3

  • fontWeightnumber

    Weight of the lines.

    Default400

  • backgroundstring

    Solid fill in place of the gradient ground; pass "transparent" to drop it.

  • fontFamilystring

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

    Default"Inter Tight"

  • 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