Parallax Lockup

A stacked headline scrolls into a lockup with parallax between lines, the last line in a gradient. A free, MIT-licensed Remotion text animation.

Installation
$ pnpm dlx shadcn@latest add @remocn/parallax-lockup

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { ParallaxLockup } from "@/components/remocn/parallax-lockup";
 
const ParallaxLockupScene = () => (
  <ParallaxLockup
    lines={["Every launch", "deserves", "a film"]}
    accentLine={2}
    accent="#3B5BFD"
  />
);
 
export const RemotionRoot = () => (
  <Composition
    id="ParallaxLockup"
    component={ParallaxLockupScene}
    durationInFrames={300}
    fps={60}
    width={1280}
    height={720}
  />
);

The lines scroll in at slightly different speeds and lock into a tightly sized stack while the accent line fills with the gradient. Pass lines and accentLine (zero-based index of the gradient line); it ships light and dark through theme.

Props12

PropTypeDefault
lines
string[]["Every launch", "deserves", "a film"]

Lines of the stack, top to bottom

accentLine
number2

Zero-based index of the line filled with the gradient

accent
string"#3B5BFD"

Accent color (any valid CSS color)

ink
string—

Text color; overrides the theme ink.

background
string—

Background fill; pass "transparent" to drop it.

fontFamily
string"Bricolage Grotesque"

Typeface for the copy. Load the font in your project first.

fontWeight
number500

Weight of the lines.

lockAt
number94

Frame where the scroll lands and the lines lock into the block.

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 speed multiplier

theme
"dark" | "light""dark"

Ships light and dark palettes

  • linesstring[]

    Lines of the stack, top to bottom

    Default["Every launch", "deserves", "a film"]

  • accentLinenumber

    Zero-based index of the line filled with the gradient

    Default2

  • accentstring

    Accent color (any valid CSS color)

    Default"#3B5BFD"

  • inkstring

    Text color; 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"Bricolage Grotesque"

  • fontWeightnumber

    Weight of the lines.

    Default500

  • lockAtnumber

    Frame where the scroll lands and the lines lock into the block.

    Default94

  • 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 speed multiplier

    Default1

  • theme"dark" | "light"

    Ships light and dark palettes

    Default"dark"