Headline to Line

Hero headline that collapses into one line in Remotion: words pop in, shrink into a sentence over a glowing horizon, and a longer description types on.

In Remotion, Headline to Line pops a hero headline in word by word, then collapses it into a single line over a glowing horizon while a longer description types on after it with a blinking caret. Use it for a hero opener that turns into the one-line pitch.

Installation
$ pnpm dlx shadcn@latest add @remocn/headline-to-line

How to build this in Remotion

You don't need fitText() plus a separate typewriter. Install the component:

bash
npx shadcn@latest add @remocn/headline-to-line

The words pop with spring(), the collapse and the typing run on interpolate() and Easing, and text widths are measured while delayRender() holds the first frame. The glow is a live gradients.sh shader (GshGround), installed with the component as @remocn/gsh.

Good to know

  • Length: 93 frames of motion at 30 fps (186 at 60 fps) with the default props. The demo plays 132 frames, which adds a hold: frames past the end of the motion hold the final frame. The Usage example below is a 60 fps composition, so the numbers it hands to Remotion are doubled, see Frame rate.
  • Installs: remotion, @remotion/google-fonts from npm, plus the remocn helpers gsh, glide, frame-rate, timeline. The shadcn CLI copies the source into your project.
  • Font: loads Geist itself through @remotion/google-fonts. Pass fontFamily to use your own face, and load that font in your project.
  • Ground presets: earthshine in dark and paper-crease in light by default. ground takes any preset id: afterhours, blue-hour, charcoal-satin, cobalt-rise, coldlight, comet, copper, corona, cyan-drift, earthshine, ember, europa, film-blue, flood, garnet, glasswork, greenhouse, hearth, iris, kiln, kiruna, lantern, low-orbit, lunar, mercury, nightfold, nova, paper-crease, petal-arc, polar, projector, refraction, riptide, solar-wind, solstice, spectral-sea, spotlight, static-sunset, velvet-hour. Pass background for a solid fill instead.
  • charsPerFrame (default 1) sets the typing speed, so a longer continuation takes more frames; give the composition room for it.

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { HeadlineToLine } from "@/components/remocn/headline-to-line";
 
const HeadlineToLineScene = () => <HeadlineToLine words={["Your", "launch", "video"]} accentIndex={1} continuation=", built from blocks you own" />;
 
export const RemotionRoot = () => (
  <Composition
    id="HeadlineToLine"
    component={HeadlineToLineScene}
    durationInFrames={264}
    fps={60}
    width={1280}
    height={720}
  />
);

Headline words pop in one by one, the accented word gets a springy pop, then the words shrink into a single line and a continuation types out after them with a blinking caret over a glowing ground. Pass words, accentIndex and continuation; ground picks the gradient preset for each 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.

Props15

PropTypeDefault
words
string[]["Your", "launch", "video"]

Headline words that pop in, then shrink into the line.

accentIndex
number1

Which headline word gets the accent color and pop.

continuation
string", built from blocks you own"

Text typed after the headline words once they shrink.

stagger
number6

Frames between headline words as they enter.

charsPerFrame
number1

How many characters of the continuation type in per frame.

accent
string—

Color of the accented word; defaults to the theme accent.

ink
string—

Text color override for the headline and continuation.

background
string—

Stage fill color; pass "transparent" to overlay your own footage.

fontFamily
string"Geist"

Typeface for the copy. Geist loads by default; load any other face 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"

Color scheme; ships dark and light.

ground
GshPresetId—

Gradient preset id for the background ground.

groundParams
Partial<GradientParams>—

Overrides for the ground preset gradient parameters.

  • wordsstring[]

    Headline words that pop in, then shrink into the line.

    Default["Your", "launch", "video"]

  • accentIndexnumber

    Which headline word gets the accent color and pop.

    Default1

  • continuationstring

    Text typed after the headline words once they shrink.

    Default", built from blocks you own"

  • staggernumber

    Frames between headline words as they enter.

    Default6

  • charsPerFramenumber

    How many characters of the continuation type in per frame.

    Default1

  • accentstring

    Color of the accented word; defaults to the theme accent.

  • inkstring

    Text color override for the headline and continuation.

  • backgroundstring

    Stage fill color; pass "transparent" to overlay your own footage.

  • fontFamilystring

    Typeface for the copy. Geist loads by default; load any other face in your project first.

    Default"Geist"

  • 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"

    Color scheme; ships dark and light.

    Default"dark"

  • groundGshPresetId

    Gradient preset id for the background ground.

  • groundParamsPartial<GradientParams>

    Overrides for the ground preset gradient parameters.

Common questions

How can I make a hero headline settle, then collapse into one line over a glowing horizon while a description types out?

Install Headline to Line with npx shadcn@latest add @remocn/headline-to-line and pass words, accentIndex and continuation.

Which glow presets can I use?

Any gradients.sh preset id listed above, through ground.

How long is it?

93 frames at 30 fps (186 at 60 fps) with the default text; the demo plays 132.