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.
$ pnpm dlx shadcn@latest add @remocn/headline-to-lineHow to build this in Remotion
You don't need fitText() plus a separate typewriter. Install the component:
npx shadcn@latest add @remocn/headline-to-lineThe 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-fontsfrom npm, plus the remocn helpersgsh,glide,frame-rate,timeline. The shadcn CLI copies the source into your project. - Font: loads Geist itself through
@remotion/google-fonts. PassfontFamilyto use your own face, and load that font in your project. - Ground presets:
earthshinein dark andpaper-creasein light by default.groundtakes 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. Passbackgroundfor a solid fill instead. charsPerFrame(default 1) sets the typing speed, so a longercontinuationtakes more frames; give the composition room for it.
Usage
// 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
| Prop | Type | Default |
|---|---|---|
| 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.
Default
1 - continuationstring
Text typed after the headline words once they shrink.
Default
", built from blocks you own" - staggernumber
Frames between headline words as they enter.
Default
6 - charsPerFramenumber
How many characters of the continuation type in per frame.
Default
1 - 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.
Default
1 - delaynumber
Frames to hold the first frame before anything moves.
Default
0 - speednumber
Playback speed multiplier for the whole timeline.
Default
1 - 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.
Related effects
- Typewriter: the headline only types, with no collapse.
- Focus Front Swap: focus moves between lines of a pitch.
- Bokeh Title: a serif headline resolves from blurred lights.