Spotlight Text

A headline sits dim in the dark and is revealed only where a moving spotlight passes over it, with a small mono eyebrow label, for developer-tool and tech openers. A free, MIT-licensed Remotion text animation.

In Remotion, Spotlight Text reveals a headline with a moving spotlight: the line sits dim in the dark, a soft circle of light glides across it and lights each word as it passes, then widens until the whole line is lit, with a small monospace eyebrow label above. Use it for a developer-tool or tech opener.

Installation
$ pnpm dlx shadcn@latest add @remocn/spotlight-text

How to build this in Remotion

You don't have to build the radial-gradient mask and its path with interpolate() yourself. Install the component and pass the headline and the eyebrow:

bash
npx shadcn@latest add @remocn/spotlight-text

The headline is drawn twice: a dim copy, and a lit copy painted with a moving radial-gradient and clipped to the letters with background-clip: text. A faint wash in the accent color follows the light on the ground. The schedule in timeline.ts brings the dim line in (enter), then the eyebrow, glides the light across in sweep frames (glide) and widens it to light the whole line (widen). The headline width is measured on a canvas before the first frame, so the light's path fits the text.

Good to know

  • Length: 132 frames of motion at 30 fps (264 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 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 Geist for the headline and Geist Mono for the eyebrow through @remotion/google-fonts. fontFamily changes the headline only; the eyebrow stays in Geist Mono unless you edit the copied file.
  • The headline is a single line. For a headline that wraps, use Line by Line Slide.

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { SpotlightText } from "@/components/remocn/spotlight-text";
 
const SpotlightTextScene = () => (
  <SpotlightText title="Launch videos, in code." eyebrow="remocn 2.0" />
);
 
export const RemotionRoot = () => (
  <Composition
    id="SpotlightText"
    component={SpotlightTextScene}
    durationInFrames={360}
    fps={60}
    width={1280}
    height={720}
  />
);

A soft spotlight enters and glides across the single-line headline, lighting it as it passes and widening until the whole line is lit. Pass title and eyebrow; it ships light and dark.

Props12

PropTypeDefault
title
string"Launch videos, in code."

The headline the light travels across. One line.

eyebrow
string"remocn 2.0"

Tiny mono label above the headline's left edge. Empty to hide.

sweep
number78

Frames for the light's pass across the headline.

spotSize
number1.25

Radius of the travelling spotlight, in em of the headline.

accent
string"#3B5BFD"

Faint tint at the rim of the spotlight, and the eyebrow marker.

ink
string—

Text color of the lit headline, as hex; overrides the theme ink.

background
string—

Background fill; pass "transparent" to drop it.

fontFamily
string"Geist"

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.

speed
number1

Playback multiplier.

theme
"dark" | "light""dark"

Colour scheme; ships light and dark.

  • titlestring

    The headline the light travels across. One line.

    Default"Launch videos, in code."

  • eyebrowstring

    Tiny mono label above the headline's left edge. Empty to hide.

    Default"remocn 2.0"

  • sweepnumber

    Frames for the light's pass across the headline.

    Default78

  • spotSizenumber

    Radius of the travelling spotlight, in em of the headline.

    Default1.25

  • accentstring

    Faint tint at the rim of the spotlight, and the eyebrow marker.

    Default"#3B5BFD"

  • inkstring

    Text color of the lit headline, as hex; 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"Geist"

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

    Default1

  • theme"dark" | "light"

    Colour scheme; ships light and dark.

    Default"dark"

Common questions

How do I reveal a headline with a moving spotlight in Remotion?

Install Spotlight Text with npx shadcn@latest add @remocn/spotlight-text and pass title. Set eyebrow for the small mono label, or an empty string to hide it. sweep sets how many frames the light takes to cross the line and spotSize its radius.

Does it work on a light background?

Yes. theme="light" dims the line on an off-white ground and lights it dark.