Two Hit

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

In Remotion, Two Hit is a premiere-style card: a right-aligned line such as Streaming now. hits on black in white, then a second hit replaces it in your accent color. Use it for a two-beat teaser or release card.

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

Good to know

  • Length: 91 frames of motion at 30 fps (182 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 (durationInFrames, Sequence lengths) are doubled. The component's own props counted in frames stay in 30 fps frames at any frame rate, 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 Urbanist itself through @remotion/google-fonts. Pass fontFamily to use your own face, and load that font in your project.
  • before and after are separate lines; set accent to the color of the second 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"