Block City

A 3D grid of blocks rises like a city skyline while +340% renders counts up. A free, MIT-licensed Remotion number animation.

Installation
$ pnpm dlx shadcn@latest add @remocn/block-city

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { BlockCity } from "@/components/remocn/block-city";
 
const BlockCityScene = () => (
  <BlockCity value={340} prefix="+" suffix="%" caption="renders" />
);
 
export const RemotionRoot = () => (
  <Composition
    id="BlockCity"
    component={BlockCityScene}
    durationInFrames={500}
    fps={60}
    width={1280}
    height={720}
  />
);

A camera flies low over a grid of blocks that rise like a city, then cranes up into a front view where the tallest tower is lit and the stat counts up beside it. Pass value, prefix, suffix and caption for the number, and data (one number per column) to shape the skyline. Ships dark and light via theme.

Props16

PropTypeDefault
value
number340

Hero number, counted up on the accent block.

prefix
string"+"

Text before the number, such as a plus sign.

suffix
string"%"

Text after the number, such as a percent sign.

caption
string"renders"

Muted word after the number.

data
number[]—

Optional dataset: one value per column, left to right (any scale).

fontWeight
number400

Weight of the hero number.

countUp
number40

Frames the hero number takes to count up.

accent
string"#3B5BFD"

Color of the hero tower and number.

ink
string—

Text color; overrides the theme ink.

background
string—

Background fill; pass "transparent" to drop it.

fontFamily
string"Sora"

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

grain
booleantrue

Film grain over the scene.

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.

theme
"dark" | "light""dark"

Dark or light palette.

  • valuenumber

    Hero number, counted up on the accent block.

    Default340

  • prefixstring

    Text before the number, such as a plus sign.

    Default"+"

  • suffixstring

    Text after the number, such as a percent sign.

    Default"%"

  • captionstring

    Muted word after the number.

    Default"renders"

  • datanumber[]

    Optional dataset: one value per column, left to right (any scale).

  • fontWeightnumber

    Weight of the hero number.

    Default400

  • countUpnumber

    Frames the hero number takes to count up.

    Default40

  • accentstring

    Color of the hero tower and number.

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

  • grainboolean

    Film grain over the scene.

    Defaulttrue

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

    Default1

  • theme"dark" | "light"

    Dark or light palette.

    Default"dark"