Skip to content
react-wrapped

Meter chart

Meter lines up one slim pill per thing counted and lights each by its value. Zero stays dark, which makes gaps as readable as peaks.

Meter

Epic

One pill per thing counted, lit where there was something.

One pill per thing counted, lit where there was something.

Installation

bash
pnpm add @react-wrapped/charts @react-wrapped/core gsap

Usage

A chart is data, not markup. Hand a scene an object with type set and the numbers to draw, and the scene draws it and plays its entrance on the video's timeline.

tsx
import { chartScene } from "@react-wrapped/scenes";

export const scene = chartScene(
  {
    eyebrow: "Your year",
    title: ["Meter."],
    lede: "One pill per thing counted, lit where there was something.",
    chart: {
      type: "meter",
      pills: [
        27, 30, 0, 0, 27, 37, 36, 44, 0, 0, 21, 4,
        // ...and 40 more
      ],
      from: "Oct 2025",
      to: "Oct 2026",
      note: "38 of 52 Fridays",
    },
  },
  { key: "meter", label: "Meter" },
);

Props

PropTypeWhat it does
type"meter"Picks this chart.
pillsreadonly number[]One value per pill. Zero is dark, the biggest value is the brightest.
fromstringThe label under the left end.
tostringThe label under the right end.
notestringA note in a pill above the row.

How it comes in

Every chart plays in the order it is read: what it is made of stands first, the numbers arrive with a direction, and the one thing the chart is about lands last with its pill. Nothing is on screen before its own entrance. See how charts animate for the shared rules.

Last updated . Read this page as Markdown.