Point Hop
A decimal point hops between digits to change units, ending on a value with a metric prefix. A free, MIT-licensed Remotion number animation.
$ pnpm dlx shadcn@latest add @remocn/point-hopUsage
// src/Root.tsx
import { Composition } from "remotion";
import { PointHop } from "@/components/remocn/point-hop";
const PointHopScene = () => (
<PointHop value={0.0000342} unit="s" label="scene refresh after a prop change" />
);
export const RemotionRoot = () => (
<Composition
id="PointHop"
component={PointHopScene}
durationInFrames={300}
fps={60}
width={1280}
height={720}
/>
);The tiny value starts as a long string of zeros. Its decimal point hops three digits at a time while the unit prefix swaps, once per step, until the figure reads cleanly. Pass value in base units, unit, prefixes and label; it ships light and dark through theme.
Props14
| Prop | Type | Default |
|---|---|---|
| value | number3.42e-05 Value in base units, such as seconds. | |
| unit | string"s" Base unit symbol shown after the prefix. | |
| prefixes | string[]["", "m", "µ", "n"] Unit prefixes in order of three digits each, starting with none. | |
| label | string"scene refresh after a prop change" Caption that rises in at the top. | |
| hop | number7 Frames for the point to hop over one digit. | |
| rest | number12 Frames the number rests between prefix steps. | |
| accent | string— Accent color for highlights and small marks. | |
| ink | string— Text color; overrides the theme ink. | |
| background | string— Background color override. Pass "transparent" to composite over other layers. | |
| 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. | |
| speed | number1 Playback speed multiplier for the whole timeline. | |
| theme | "dark" | "light""dark" Color theme, "dark" or "light". | |
- valuenumber
Value in base units, such as seconds.
Default
3.42e-05 - unitstring
Base unit symbol shown after the prefix.
Default
"s" - prefixesstring[]
Unit prefixes in order of three digits each, starting with none.
Default
["", "m", "µ", "n"] - labelstring
Caption that rises in at the top.
Default
"scene refresh after a prop change" - hopnumber
Frames for the point to hop over one digit.
Default
7 - restnumber
Frames the number rests between prefix steps.
Default
12 - accentstring
Accent color for highlights and small marks.
- inkstring
Text color; overrides the theme ink.
- backgroundstring
Background color override. Pass "transparent" to composite over other layers.
- 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 - speednumber
Playback speed multiplier for the whole timeline.
Default
1 - theme"dark" | "light"
Color theme, "dark" or "light".
Default
"dark"