Zero Stretch
The zero in a number stretches into a glossy pill that holds a label word, then a caption lands. A free, MIT-licensed Remotion number animation.
$ pnpm dlx shadcn@latest add @remocn/zero-stretchUsage
// src/Root.tsx
import { Composition } from "remotion";
import { ZeroStretch } from "@/components/remocn/zero-stretch";
const ZeroStretchScene = () => (
<ZeroStretch value="200" label="components" caption="Ready to ship. Copy one in, own every frame." />
);
export const RemotionRoot = () => (
<Composition
id="ZeroStretch"
component={ZeroStretchScene}
durationInFrames={270}
fps={60}
width={1280}
height={720}
/>
);The digits rise in, then the first zero springs open into a glossy pill that carries the label word. The caption rises in below. Pass value (a zero is added if it has none), label and caption; it ships light and dark through theme.
Props14
| Prop | Type | Default |
|---|---|---|
| value | string"200" Figure whose zero stretches, as text. A zero is added if missing. | |
| label | string"components" Word held inside the stretched pill. | |
| caption | string"Ready to ship. Copy one in, own every frame." Line that rises in under the figure. | |
| fontFamily | string"Outfit" Typeface for the copy. Load the font in your project first. | |
| fontWeight | number500 Weight of the figure. | |
| stagger | number3 Frames between digits as they rise. | |
| accent | string"#3B5BFD" Accent color for highlights and small marks. | |
| ink | string— Text color; overrides the theme ink. | |
| background | string— Background fill; pass "transparent" to drop it. | |
| 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 speed multiplier for the whole timeline. | |
| theme | "dark" | "light""dark" Color theme, "dark" or "light". | |
- valuestring
Figure whose zero stretches, as text. A zero is added if missing.
Default
"200" - labelstring
Word held inside the stretched pill.
Default
"components" - captionstring
Line that rises in under the figure.
Default
"Ready to ship. Copy one in, own every frame." - fontFamilystring
Typeface for the copy. Load the font in your project first.
Default
"Outfit" - fontWeightnumber
Weight of the figure.
Default
500 - staggernumber
Frames between digits as they rise.
Default
3 - accentstring
Accent color for highlights and small marks.
Default
"#3B5BFD" - inkstring
Text color; overrides the theme ink.
- backgroundstring
Background fill; pass "transparent" to drop it.
- 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 - speednumber
Playback speed multiplier for the whole timeline.
Default
1 - theme"dark" | "light"
Color theme, "dark" or "light".
Default
"dark"