Sparkline Thread
A glowing sparkline climbs to a point while +212% counts up beside it. A free, MIT-licensed Remotion number animation.
$ pnpm dlx shadcn@latest add @remocn/sparkline-threadUsage
// src/Root.tsx
import { Composition } from "remotion";
import { SparklineThread } from "@/components/remocn/sparkline-thread";
const SparklineThreadScene = () => (
<SparklineThread
values={[20, 26, 24, 35, 34, 49, 56, 64, 77]}
metric="+212%"
label="weekly renders"
/>
);
export const RemotionRoot = () => (
<Composition
id="SparklineThread"
component={SparklineThreadScene}
durationInFrames={300}
fps={60}
width={1280}
height={720}
/>
);Data points pop in, a glowing thread draws through them and thickens into an area fill, then a bloom at the last point leads to the metric counting up with its label. Pass values (one number per point), metric and label. Ships dark and light via theme.
Props14
| Prop | Type | Default |
|---|---|---|
| values | number[]DEFAULT_VALUES Data points along the line, in order. | |
| metric | string"+212%" The stat that counts up, such as +212%. | |
| label | string"weekly renders" Line under the metric. | |
| stagger | number2 Frames between data points as they pop in. | |
| drawDuration | number42 Frames the thread takes to run through the points; the thickening and the landing follow it. | |
| 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"Geist" 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. | |
| grain | booleantrue Film grain over the scene. | |
| speed | number1 Playback multiplier. | |
| theme | "dark" | "light""dark" Dark or light palette. | |
- valuesnumber[]
Data points along the line, in order.
Default
DEFAULT_VALUES - metricstring
The stat that counts up, such as +212%.
Default
"+212%" - labelstring
Line under the metric.
Default
"weekly renders" - staggernumber
Frames between data points as they pop in.
Default
2 - drawDurationnumber
Frames the thread takes to run through the points; the thickening and the landing follow it.
Default
42 - 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
"Geist" - 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 - grainboolean
Film grain over the scene.
Default
true - speednumber
Playback multiplier.
Default
1 - theme"dark" | "light"
Dark or light palette.
Default
"dark"