Smash Count

A giant numeral hard-cuts up through larger values between corners and lands beside a small caption. A free, MIT-licensed Remotion number animation.

Installation
$ pnpm dlx shadcn@latest add @remocn/smash-count

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { SmashCount } from "@/components/remocn/smash-count";
 
const SmashCountScene = () => <SmashCount value={64} from={1} cuts={6} label="scenes, zero keyframes" />;
 
export const RemotionRoot = () => (
  <Composition
    id="SmashCount"
    component={SmashCountScene}
    durationInFrames={240}
    fps={60}
    width={1280}
    height={720}
  />
);

A giant numeral hard-cuts through a series of larger and larger values, each cut punching in at a new corner of the frame and the cuts speeding up, until the final value lands large at the bottom left and a caption appears in the top right. Pass value, from, cuts and label; accent is the numeral color. It ships light and dark through theme.

Props16

PropTypeDefault
value
number64

The final number.

from
number1

First number shown before the cuts.

cuts
number6

How many hard cuts, including the final one.

firstGap
number13

Frames between the first two cuts; the gaps shrink evenly toward `lastGap`.

lastGap
number6

Frames between the last two cuts.

prefix
string""

Text before the number.

suffix
string""

Text after the number.

label
string"scenes, zero keyframes"

Caption shown top right on the final cut.

accent
string"#E60012"

Color of the numeral.

ink
string—

Text color; overrides the theme ink.

background
string—

Stage background color; overrides the theme ground.

fontFamily
string"Rubik"

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

theme
"dark" | "light""dark"

Light or dark palette.

  • valuenumber

    The final number.

    Default64

  • fromnumber

    First number shown before the cuts.

    Default1

  • cutsnumber

    How many hard cuts, including the final one.

    Default6

  • firstGapnumber

    Frames between the first two cuts; the gaps shrink evenly toward `lastGap`.

    Default13

  • lastGapnumber

    Frames between the last two cuts.

    Default6

  • prefixstring

    Text before the number.

    Default""

  • suffixstring

    Text after the number.

    Default""

  • labelstring

    Caption shown top right on the final cut.

    Default"scenes, zero keyframes"

  • accentstring

    Color of the numeral.

    Default"#E60012"

  • inkstring

    Text color; overrides the theme ink.

  • backgroundstring

    Stage background color; overrides the theme ground.

  • fontFamilystring

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

    Default"Rubik"

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

    Light or dark palette.

    Default"dark"