Beat Count

A big thin numeral counts to 64 in steps locked to a BPM, with a small caption. A free, MIT-licensed Remotion number animation.

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

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { BeatCount } from "@/components/remocn/beat-count";
 
const BeatCountScene = () => <BeatCount value={64} beats={8} bpm={120} label="cuts, each one landing on the kick" />;
 
export const RemotionRoot = () => (
  <Composition
    id="BeatCount"
    component={BeatCountScene}
    durationInFrames={160}
    fps={30}
    width={1280}
    height={720}
  />
);

A big numeral steps from from to value in beats equal jumps, one per beat at the given bpm. On each beat it squashes down and thins its weight before releasing, and the last beat rebounds with a spring. A small caption fades in at the top left after the first beat. Pass value, beats, bpm, label, and optionally prefix, suffix and decimals. It ships light and dark through the theme prop.

Props18

PropTypeDefault
value
number64

The final number the count lands on.

from
number0

The number shown before the first beat.

beats
number8

How many steps the count takes, one per beat.

bpm
number120

Tempo in beats per minute; 30 at minimum. Sets the frames per step.

decimals
number0

Decimal places shown on the number.

fontWeight
number200

Weight of the number between beats; each beat swells it toward 500.

punch
number0.2

How far each beat squashes the number, as a fraction of its height.

prefix
string""

Text placed before the number, such as a currency sign.

suffix
string""

Text placed after the number, such as a unit.

label
string"cuts, each one landing on the kick"

Caption at the top left.

accent
string—

Colour of the caption text.

ink
string—

Text color; overrides the theme ink.

background
string—

Stage colour; pass 'transparent' to layer over other footage.

fontFamily
string"Inter Tight"

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; 1 is the designed pace.

theme
"dark" | "light""dark"

Ships light and dark.

  • valuenumber

    The final number the count lands on.

    Default64

  • fromnumber

    The number shown before the first beat.

    Default0

  • beatsnumber

    How many steps the count takes, one per beat.

    Default8

  • bpmnumber

    Tempo in beats per minute; 30 at minimum. Sets the frames per step.

    Default120

  • decimalsnumber

    Decimal places shown on the number.

    Default0

  • fontWeightnumber

    Weight of the number between beats; each beat swells it toward 500.

    Default200

  • punchnumber

    How far each beat squashes the number, as a fraction of its height.

    Default0.2

  • prefixstring

    Text placed before the number, such as a currency sign.

    Default""

  • suffixstring

    Text placed after the number, such as a unit.

    Default""

  • labelstring

    Caption at the top left.

    Default"cuts, each one landing on the kick"

  • accentstring

    Colour of the caption text.

  • inkstring

    Text color; overrides the theme ink.

  • backgroundstring

    Stage colour; pass 'transparent' to layer over other footage.

  • fontFamilystring

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

    Default"Inter Tight"

  • 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; 1 is the designed pace.

    Default1

  • theme"dark" | "light"

    Ships light and dark.

    Default"dark"