Pixel Bars
LED-style pixel bars climb, the last column lighting orange and blue to +64%. A free, MIT-licensed Remotion number animation.
$ pnpm dlx shadcn@latest add @remocn/pixel-barsUsage
// src/Root.tsx
import { Composition } from "remotion";
import { PixelBars } from "@/components/remocn/pixel-bars";
const PixelBarsScene = () => (
<PixelBars
values={[31, 38, 35, 44, 41, 50, 84]}
metric="+64%"
label="this quarter"
/>
);
export const RemotionRoot = () => (
<Composition
id="PixelBars"
component={PixelBarsScene}
durationInFrames={115}
fps={30}
width={1280}
height={720}
/>
);Columns of LED-style pixels light up bar by bar; the last column climbs past the previous best, turns orange and blue, and the metric counts up beside the chart. Pass values (one number per column), metric and label. Ships dark and light via theme.
Props14
| Prop | Type | Default |
|---|---|---|
| values | number[]DEFAULT_VALUES One number per column; the last is the hero. | |
| label | string"this quarter" Small line under the metric. | |
| metric | string"+64%" The big stat that counts up, such as +64%. | |
| stagger | number5 Frames between one column starting to fill and the next. | |
| rows | number14 Pixel rows in the tallest column; more rows make smaller pixels. | |
| accent | string"#3B5BFD" Accent color for the hero element. | |
| ink | string— Text color; overrides the theme ink. | |
| background | string— Background fill; pass "transparent" to drop it. | |
| fontFamily | string"Space Grotesk" 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. | |
| theme | "dark" | "light""dark" Dark or light palette. | |
| speed | number1 Playback multiplier. | |
- valuesnumber[]
One number per column; the last is the hero.
Default
DEFAULT_VALUES - labelstring
Small line under the metric.
Default
"this quarter" - metricstring
The big stat that counts up, such as +64%.
Default
"+64%" - staggernumber
Frames between one column starting to fill and the next.
Default
5 - rowsnumber
Pixel rows in the tallest column; more rows make smaller pixels.
Default
14 - accentstring
Accent color for the hero element.
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
"Space Grotesk" - grainboolean
Film grain over the scene.
Default
true - scalenumber
Size of the foreground around the frame's center; the background stays put.
Default
1 - delaynumber
Frames to hold the first frame before anything moves.
Default
0 - theme"dark" | "light"
Dark or light palette.
Default
"dark" - speednumber
Playback multiplier.
Default
1