Measure Dim

A gradient bar is measured by dimension lines as 184 fps overtakes 60 fps. A free, MIT-licensed Remotion number animation.

Installation
$ pnpm dlx shadcn@latest add @remocn/measure-dim

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { MeasureDim } from "@/components/remocn/measure-dim";
 
const MeasureDimScene = () => (
  <MeasureDim
    value="184 fps"
    before="60 fps"
    beforeLabel="Before"
  />
);
 
export const RemotionRoot = () => (
  <Composition
    id="MeasureDim"
    component={MeasureDimScene}
    durationInFrames={130}
    fps={30}
    width={1280}
    height={720}
  />
);

A gradient bar draws in, extension lines drop and a dimension arrow counts the new value along it. A ghost bar for the previous value then appears below and gets its own dimension line. Pass value and before with their units, and label and beforeLabel to name the two bars. It ships light and dark through the theme prop.

Props17

PropTypeDefault
subject
React.ReactNode—

Optional node shown in place of the bar label, e.g. a logo.

label
string"remocn"

Name shown on the hero bar.

value
string"184 fps"

The new measurement with its unit, e.g. '184 fps'. The number counts up.

before
string"60 fps"

The previous measurement with its unit. Leave empty to drop the ghost bar.

beforeLabel
string"Before"

Name shown on the ghost bar.

accent
string"#3B5BFD"

Highlight colour woven into the bar gradient.

ink
string—

Text color; overrides the theme ink.

background
string—

Background fill; pass "transparent" to drop it.

fontFamily
string"Manrope"

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

fontWeight
number500

Weight of the measured figures.

radius
number8

Corner radius of the bars, in pixels at 720p.

logo
React.ReactNode—

Replaces the remocn mark.

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.

theme
"dark" | "light""dark"

Ships light and dark.

speed
number1

Playback speed multiplier; 1 is the designed pace.

  • subjectReact.ReactNode

    Optional node shown in place of the bar label, e.g. a logo.

  • labelstring

    Name shown on the hero bar.

    Default"remocn"

  • valuestring

    The new measurement with its unit, e.g. '184 fps'. The number counts up.

    Default"184 fps"

  • beforestring

    The previous measurement with its unit. Leave empty to drop the ghost bar.

    Default"60 fps"

  • beforeLabelstring

    Name shown on the ghost bar.

    Default"Before"

  • accentstring

    Highlight colour woven into the bar gradient.

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

  • fontWeightnumber

    Weight of the measured figures.

    Default500

  • radiusnumber

    Corner radius of the bars, in pixels at 720p.

    Default8

  • logoReact.ReactNode

    Replaces the remocn mark.

  • 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

  • theme"dark" | "light"

    Ships light and dark.

    Default"dark"

  • speednumber

    Playback speed multiplier; 1 is the designed pace.

    Default1