Two Hit

A two-hit headline, "Streaming now.", in white then blue, right-aligned on black. A free, MIT-licensed Remotion text animation.

Installation
$ pnpm dlx shadcn@latest add @remocn/two-hit

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { TwoHit } from "@/components/remocn/two-hit";
 
const TwoHitScene = () => (
  <TwoHit before="Premieres Friday." after="Streaming now." hitAt={34} />
);
 
export const RemotionRoot = () => (
  <Composition
    id="TwoHit"
    component={TwoHitScene}
    durationInFrames={240}
    fps={60}
    width={1280}
    height={720}
  />
);

The first line appears, then at hitAt it is hit and replaced by the second line in the accent colour, right-aligned on a flat background. Pass before, after and hitAt; it ships light and dark.

Props13

PropTypeDefault
before
string"Premieres Friday."

First line, shown in the base text colour.

after
string"Streaming now."

Second line that replaces it in the accent colour.

hitAt
number34

Frame where the second hit lands.

hitGap
number24

Frames between the first, small hit and the second, full one.

fontWeight
number400

Weight of the lines.

accent
string—

Accent colour (any CSS colour).

ink
string—

Text color; overrides the theme ink.

background
string—

Overrides the theme background colour.

fontFamily
string"Urbanist"

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

theme
"dark" | "light""dark"

Colour scheme; ships light and dark.

  • beforestring

    First line, shown in the base text colour.

    Default"Premieres Friday."

  • afterstring

    Second line that replaces it in the accent colour.

    Default"Streaming now."

  • hitAtnumber

    Frame where the second hit lands.

    Default34

  • hitGapnumber

    Frames between the first, small hit and the second, full one.

    Default24

  • fontWeightnumber

    Weight of the lines.

    Default400

  • accentstring

    Accent colour (any CSS colour).

  • inkstring

    Text color; overrides the theme ink.

  • backgroundstring

    Overrides the theme background colour.

  • fontFamilystring

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

    Default"Urbanist"

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