Hidden Word

Hidden word reveal for Remotion: a key word is found letter by letter inside a sentence, then its letters lift out to form a big serif italic headline.

In Remotion, Hidden Word hides a key word inside a sentence: its letters are found one by one, light up in place, and then lift out to form a big serif italic headline. Use it for a reveal beat where the point is already hiding in the copy.

Installation
$ pnpm dlx shadcn@latest add @remocn/hidden-word

How to build this in Remotion

You don't need measureText() and per-letter springs. Install the component and pass the sentence and the word:

bash
npx shadcn@latest add @remocn/hidden-word

The letters are located in the sentence, lit with interpolateColors() and flown into place with interpolate() and Easing. Layout uses the Hanken Grotesk and Instrument Serif metrics built into the file, so there is no measuring step and no fitText().

Good to know

  • Length: 152 frames of motion at 30 fps (304 at 60 fps) with the default props. The demo plays 186 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-fonts from npm, plus the remocn helpers glide, frame-rate, timeline. The shadcn CLI copies the source into your project.
  • Fonts: loads Hanken Grotesk (the sentence) and Instrument Serif italic (the headline word) itself through @remotion/google-fonts. fontFamily changes the sentence only, and the layout keeps Hanken Grotesk metrics, so another face may set looser or tighter. The headline is always Instrument Serif italic.
  • Which letters are picked: text must contain the letters of word in order, case-insensitive. When a letter appears several times, the component picks the occurrences spread most evenly across the sentence and prefers an exact case match. There is no prop to choose a specific occurrence.
  • stagger (default 6) is the frames between letters as they lift out.

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { HiddenWord } from "@/components/remocn/hidden-word";
 
const HiddenWordScene = () => (
  <HiddenWord
    text="Every founder deserves a launch video that feels expensive."
    word="love"
  />
);
 
export const RemotionRoot = () => (
  <Composition
    id="HiddenWord"
    component={HiddenWordScene}
    durationInFrames={372}
    fps={60}
    width={1280}
    height={720}
  />
);

The sentence fades in line by line, the letters of word light up in order inside it, the rest dims, and each lit letter lifts out and flies into place to form a large serif italic word. Pass text (it must contain the letters of word in order, case-insensitive) and word; it ships light and dark through theme.

Props12

PropTypeDefault
text
string"Small teams make their launch film in code and post it by Friday."

The sentence, set as editorial body type.

word
string"ship"

The word hiding in `text`; its letters are found in order.

stagger
number6

Frames between letters as they lift out of the sentence.

accent
string"#3B5BFD"

Color of the lit letters and the empty-slot rule.

ink
string—

Text color; overrides the theme ink.

background
string—

Background fill; pass "transparent" to drop it.

fontFamily
string"Hanken Grotesk"

Typeface for the copy. Hanken Grotesk 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.

grain
booleantrue

Film grain over the scene.

theme
"dark" | "light""dark"

Ships light and dark.

speed
number1

Playback speed multiplier.

  • textstring

    The sentence, set as editorial body type.

    Default"Small teams make their launch film in code and post it by Friday."

  • wordstring

    The word hiding in `text`; its letters are found in order.

    Default"ship"

  • staggernumber

    Frames between letters as they lift out of the sentence.

    Default6

  • accentstring

    Color of the lit letters and the empty-slot rule.

    Default"#3B5BFD"

  • inkstring

    Text color; overrides the theme ink.

  • backgroundstring

    Background fill; pass "transparent" to drop it.

  • fontFamilystring

    Typeface for the copy. Hanken Grotesk loads by default; load any other face in your project first.

    Default"Hanken Grotesk"

  • 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

  • grainboolean

    Film grain over the scene.

    Defaulttrue

  • theme"dark" | "light"

    Ships light and dark.

    Default"dark"

  • speednumber

    Playback speed multiplier.

    Default1

Common questions

How do I make a text reveal in Remotion where a key word hidden in a sentence is found letter by letter and lifted out as a headline?

Install Hidden Word with npx shadcn@latest add @remocn/hidden-word and pass text and word.

Can I choose which occurrence of a letter is used?

No. It picks letters spread evenly across the sentence; reword the sentence if it picks the wrong one.

Can the headline use another font?

Not with a prop. It is Instrument Serif italic, loaded in the copied file.