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.

Installation
$ pnpm dlx shadcn@latest add @remocn/chunk-stack

How to build this in Remotion

No need to animate a scaleX highlight bar or bring in GSAP. Install the component and pass the slogan:

bash
npx shadcn@latest add @remocn/chunk-stack

Words 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-fonts from npm, plus the remocn helpers glide, frame-rate, timeline. The shadcn CLI copies the source into your project.
  • Font: loads Nunito itself through @remotion/google-fonts. Pass fontFamily to use your own face, and load that font in your project.
  • The highlighter is yellow by default: #FFD23F on the dark theme's green #133A24 ground. The light theme flips it to a white bar on a yellow ground. Pass accent for another color.
  • highlight should be one of the words in text.

Usage

tsx
// 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

PropTypeDefault
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.

    Default500

  • staggernumber

    Frames between words as they drop into the stack.

    Default4

  • 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 multiplier; above 1 plays faster.

    Default1

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