Chunk Stack
Slogan stacked one word per line, rising into place, with a yellow highlighter swipe opening behind one key word. A bold social-style statement. A free, MIT-licensed Remotion text animation.
In Remotion, Chunk Stack stacks a slogan such as "learn motion by making it" one word per line and swipes a yellow highlighter behind one key word, here "making". Use it for a bold, readable statement in a social cut or a short promo.
$ pnpm dlx shadcn@latest add @remocn/chunk-stackHow to build this in Remotion
No need to animate a scaleX highlight bar or bring in GSAP. Install the component and pass the slogan:
npx shadcn@latest add @remocn/chunk-stackWords rise into the stack one after another on a schedule from timeline.ts, then the highlighter bar opens behind the chosen word; each move is an interpolate() over an Easing curve. Word widths are measured before the first frame (held with delayRender) so the bar fits the word exactly.
Good to know
- Length: 94 frames of motion at 30 fps (188 at 60 fps) with the default props. The demo composition plays 130 frames, which adds a hold. Timing is fixed: a longer composition holds the finished stack. 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 helpersglide,frame-rate,timeline. The shadcn CLI copies the source into your project. - Font: loads Nunito itself through
@remotion/google-fonts. PassfontFamilyto use your own face, and load that font in your project. - The highlighter is yellow by default:
#FFD23Fon the dark theme's green#133A24ground. The light theme flips it to a white bar on a yellow ground. Passaccentfor another color. highlightshould be one of the words intext.
Usage
// src/Root.tsx
import { Composition } from "remotion";
import { ChunkStack } from "@/components/remocn/chunk-stack";
const ChunkStackScene = () => (
<ChunkStack text="learn motion by making it" highlight="making" />
);
export const RemotionRoot = () => (
<Composition
id="ChunkStack"
component={ChunkStackScene}
durationInFrames={260}
fps={60}
width={1280}
height={720}
/>
);The phrase rises into a stack, one word per line, then a highlighter bar opens behind the chosen word. Pass text and highlight; it ships light and dark.
Props12
| Prop | Type | Default |
|---|---|---|
| text | string"learn motion by making it" Phrase stacked one word per line. | |
| highlight | string"making" Word marked with the highlighter. | |
| accent | string— Accent colour (any CSS colour). | |
| ink | string— Text color; overrides the theme ink. | |
| background | string— Overrides the theme background colour. | |
| fontFamily | string"Nunito" Typeface for the copy. Nunito loads by default; load any other face in your project first. | |
| fontWeight | number500 Weight of the words. | |
| stagger | number4 Frames between words as they drop into the stack. | |
| 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 multiplier; above 1 plays faster. | |
| theme | "dark" | "light""dark" Colour scheme; ships light and dark. | |
- textstring
Phrase stacked one word per line.
Default
"learn motion by making it" - highlightstring
Word marked with the highlighter.
Default
"making" - accentstring
Accent colour (any CSS colour).
- inkstring
Text color; overrides the theme ink.
- backgroundstring
Overrides the theme background colour.
- fontFamilystring
Typeface for the copy. Nunito loads by default; load any other face in your project first.
Default
"Nunito" - fontWeightnumber
Weight of the words.
Default
500 - staggernumber
Frames between words as they drop into the stack.
Default
4 - 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 multiplier; above 1 plays faster.
Default
1 - theme"dark" | "light"
Colour scheme; ships light and dark.
Default
"dark"
Common questions
How do I stack a slogan one word per line with a yellow highlighter on one word?
Install Chunk Stack with npx shadcn@latest add @remocn/chunk-stack and pass text and highlight. The words stack one per line and the highlighter opens behind the highlighted word.
Is the highlighter yellow by default?
Yes, #FFD23F in the default dark theme. Pass accent to change it.
Do I need to load Nunito?
No, the component loads it. Load your own font only if you pass fontFamily.
Related effects
- Edge Fit: one giant word filling the frame.
- Marker Highlight: a marker block behind a phrase inside a sentence.
- Word Stack: caps words push up into a poster stack.
- Full Bleed Type: huge condensed caps words slam in one at a time.