Word Insert
Growing tagline for Remotion: a plain noun opens space in the line and new words slide into the gap in a gradient color, step by step, until the sentence becomes a full promise.
To make a tagline that starts as a single noun and opens space to insert extra words in a gradient color in Remotion, use Word Insert: each step pushes the existing words apart, the new words slide into the gap painted in a gradient, and the line grows until it reads as a full promise, such as "Launch videos." becoming "Launch videos, as code.". Use it for a tagline that builds up by insertion.
$ pnpm dlx shadcn@latest add @remocn/word-insertHow to build this in Remotion
You don't have to measure words with @remotion/layout-utils and animate the gaps by hand. Install the component and pass each version of the sentence:
npx shadcn@latest add @remocn/word-insertEvery entry in states is the previous sentence with words added. The component works out which words are new, opens a gap for them and slides the existing words aside with translate, so the layout never reflows mid-move. One gradient spans the whole final line and is clipped to the inserted words' letters, so each word shows the slice of the band it sits on. The schedule in timeline.ts starts a new state every beat frames (50 by default), with stagger frames between inserted words.
Good to know
- Length: 116 frames of motion at 30 fps (232 at 60 fps) with the default props. That is the minimum for its
Sequence; add your own hold on top. The Usage example below is a 60 fps composition, so the numbers it hands to Remotion (durationInFrames,Sequencelengths) are doubled. The component's own props counted in frames stay in 30 fps frames at any frame rate, see Frame rate. - Installs:
remotion,@remotion/google-fontsfrom npm, plus the remocn helpersglide,frame-rate,timeline. The shadcn CLI copies the source into your project. - Font: loads Manrope itself through
@remotion/google-fonts. PassfontFamilyto use your own face, and load that font in your project. - Gradient: each theme ships a fixed four-stop gradient and
accentreplaces one of its stops. The other colors are not separate props; change them in the copied source. - Line wrapping: the type size is chosen so the widest version fills the frame width, and a long tagline can break onto a second line where that gives larger type. It uses at most two lines, so very long taglines get smaller rather than wrapping further.
Usage
// src/Root.tsx
import { Composition } from "remotion";
import { WordInsert } from "@/components/remocn/word-insert";
const WordInsertScene = () => (
<WordInsert states={["Launch videos.", "Launch videos, as code."]} />
);
export const RemotionRoot = () => (
<Composition
id="WordInsert"
component={WordInsertScene}
durationInFrames={348}
fps={60}
width={1280}
height={720}
/>
);Each entry in states is the same sentence with more words added, and the new words open a gap and slide in with a gradient. Pass states as successive versions of your line. It ships in light and dark through the theme prop.
Props12
| Prop | Type | Default |
|---|---|---|
| states | string[]DEFAULT_STATES Successive versions of the sentence, each adding words. | |
| beat | number50 Frames between one state of the sentence and the next. | |
| stagger | number3 Frames between words as they enter. | |
| accent | string"#3B5BFD" Accent color override; falls back to the theme accent. | |
| ink | string— Text color; overrides the theme ink. | |
| background | string— Background fill; pass "transparent" to drop it. | |
| fontFamily | string"Manrope" 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. | |
| grain | booleantrue Film grain over the scene. | |
| theme | "dark" | "light""dark" Ships light and dark; picks the palette. | |
| speed | number1 Playback speed multiplier for the whole timeline. | |
- statesstring[]
Successive versions of the sentence, each adding words.
Default
DEFAULT_STATES - beatnumber
Frames between one state of the sentence and the next.
Default
50 - staggernumber
Frames between words as they enter.
Default
3 - accentstring
Accent color override; falls back to the theme accent.
Default
"#3B5BFD" - inkstring
Text color; overrides the theme ink.
- backgroundstring
Background fill; pass "transparent" to drop it.
- fontFamilystring
Typeface for the copy. Load the font in your project first.
Default
"Manrope" - 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 - grainboolean
Film grain over the scene.
Default
true - theme"dark" | "light"
Ships light and dark; picks the palette.
Default
"dark" - speednumber
Playback speed multiplier for the whole timeline.
Default
1
Common questions
How do I animate words being inserted into a sentence?
Install Word Insert with npx shadcn@latest add @remocn/word-insert and pass states, each one the previous sentence plus the new words. The line opens a gap and the added words slide in with a gradient.
Can I set the gradient colors?
Only one stop, through accent. The rest of each theme's gradient is fixed in the source.
What if the tagline is long?
It wraps onto at most two lines and the type shrinks to fit the frame width.
Related effects
- Select Replace: words are selected and replaced instead of added.
- Layout Swap: the sentence resets its layout between versions.
- Typo Fix: one word is corrected in place.