Word Push
Words drive in from the right and push the line left into its new center. A free, MIT-licensed Remotion text animation.
In Remotion, Word Push builds a tagline word by word: each new word drives in from the right and pushes the existing line left so the phrase stays centered. Use it for one closing phrase that should build with physical, push-driven motion.
$ pnpm dlx shadcn@latest add @remocn/word-pushGood to know
- Length: 42 frames of motion at 30 fps (84 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:
remotionfrom npm, plus the remocn helpersframe-rate,timeline. The shadcn CLI copies the source into your project. - Font: Geist Sans through the
--font-geist-sansCSS variable, with a system sans fallback. The font is set inline, so change it in the copied file; aclassNamefont does not override an inline style.
Usage
The first word glides in from the left and settles at center. Each following word appears slightly to the right of its slot and drives left into place, pushing the whole line left by half its width so the phrase always settles centered.
// src/Root.tsx
import { Composition } from "remotion";
import { WordPush } from "@/components/remocn/word-push";
const WordPushScene = () => <WordPush text="move at your own pace" />;
export const RemotionRoot = () => (
<Composition
id="WordPush"
component={WordPushScene}
durationInFrames={180}
fps={60}
width={1280}
height={720}
/>
);With Backdrop
The component renders transparent — supply the background via Backdrop. It ships single-theme; edit the copied file to re-theme colors.
import { Composition } from "remotion";
import { WordPush } from "@/components/remocn/word-push";
import { Backdrop } from "@/components/remocn/backdrop";
const WordPushScene = () => (
<Backdrop fill={{ type: "color", value: "#0b0b14" }}>
<WordPush text="move at your own pace" color="#ffffff" />
</Backdrop>
);
export const RemotionRoot = () => (
<Composition
id="WordPush"
component={WordPushScene}
durationInFrames={180}
fps={60}
width={1280}
height={720}
/>
);Syncing to a voiceover
wordGap sets the first gap and accel shrinks every following one, so the build accelerates as one gesture rather than per word. The exported wordPushLength(text, wordGap) helper returns the frame on which the last push settles — use it as the lower bound of the Sequence.
Props7
| Prop | Type | Default |
|---|---|---|
| textrequired | string— The phrase; words are split on spaces. | |
| fontSize | number72 Font size in pixels | |
| wordGap | number10 Frames between the first two word arrivals; later gaps shrink by accel. | |
| accel | number0.8 Each next gap is the previous one multiplied by this — one accelerando across the phrase. 1 keeps the rhythm uniform. | |
| color | string"#171717" Text color (any valid CSS color) | |
| fontWeight | number400 CSS font-weight | |
| className | string— Optional className passed to the underlying span | |
- textrequiredstring
The phrase; words are split on spaces.
- fontSizenumber
Font size in pixels
Default
72 - wordGapnumber
Frames between the first two word arrivals; later gaps shrink by accel.
Default
10 - accelnumber
Each next gap is the previous one multiplied by this — one accelerando across the phrase. 1 keeps the rhythm uniform.
Default
0.8 - colorstring
Text color (any valid CSS color)
Default
"#171717" - fontWeightnumber
CSS font-weight
Default
400 - classNamestring
Optional className passed to the underlying span