Single Stroke
A giant number such as the date 27 is drawn in one continuous pen stroke on a teal field beside a coral month panel and a demo-day line. A free, MIT-licensed Remotion number animation.
$ pnpm dlx shadcn@latest add @remocn/single-strokeUsage
// src/Root.tsx
import { Composition } from "remotion";
import { SingleStroke } from "@/components/remocn/single-stroke";
const SingleStrokeScene = () => (
<SingleStroke
value="27"
unit="Mar"
label="Demo day. Every team shows a film."
/>
);
export const RemotionRoot = () => (
<Composition
id="SingleStroke"
component={SingleStrokeScene}
durationInFrames={240}
fps={60}
width={1280}
height={720}
/>
);A coloured panel slides in and the number is drawn as one continuous stroke with a bright pen tip. As the stroke finishes, the unit text appears on the panel and the label fades in word by word. Pass value as digits only, plus unit and label. It ships light and dark through the theme prop; accent recolours the panel in dark and the stroke in light.
Props13
| Prop | Type | Default |
|---|---|---|
| value | string"27" The number to draw. Digits only; other characters are skipped. | |
| unit | string"Mar" Short word on the panel, such as a month abbreviation. | |
| label | string"Demo day. Every team shows a film." Caption under the unit; words fade in one by one. | |
| drawDuration | number46 Frames the stroke takes to write the number. | |
| stagger | number3 Frames between label words. | |
| accent | string— Overrides the panel colour in dark, or the stroke colour in light. | |
| ink | string— Text color; overrides the theme ink. | |
| background | string— Overrides the background colour of the stage. | |
| fontFamily | string"Archivo" Typeface for the copy. Load the font in your project first. | |
| scale | number1 Size of the number and of the panel copy, each around its own center; the background and panel stay put. | |
| delay | number0 Frames to hold the first frame before anything moves. | |
| speed | number1 Playback speed multiplier; 1 is the designed pace. | |
| theme | "dark" | "light""dark" Ships light and dark. | |
- valuestring
The number to draw. Digits only; other characters are skipped.
Default
"27" - unitstring
Short word on the panel, such as a month abbreviation.
Default
"Mar" - labelstring
Caption under the unit; words fade in one by one.
Default
"Demo day. Every team shows a film." - drawDurationnumber
Frames the stroke takes to write the number.
Default
46 - staggernumber
Frames between label words.
Default
3 - accentstring
Overrides the panel colour in dark, or the stroke colour in light.
- inkstring
Text color; overrides the theme ink.
- backgroundstring
Overrides the background colour of the stage.
- fontFamilystring
Typeface for the copy. Load the font in your project first.
Default
"Archivo" - scalenumber
Size of the number and of the panel copy, each around its own center; the background and panel stay put.
Default
1 - delaynumber
Frames to hold the first frame before anything moves.
Default
0 - speednumber
Playback speed multiplier; 1 is the designed pace.
Default
1 - theme"dark" | "light"
Ships light and dark.
Default
"dark"
Common questions
How do I draw a giant number in a single pen stroke in Remotion?
Install Single Stroke with npx shadcn@latest add @remocn/single-stroke and pass the digits as value, for example "27". It ships its own single-stroke paths for the digits 0 to 9, joins them into one continuous line and draws it with a bright pen tip, measured with getLength() and getPointAtLength() from @remotion/paths. You don't need to trace a font with Potrace, AutoTrace, Figma or Inkscape.
Which theme gives the teal field with the coral panel?
theme="dark", the default: a teal field #0E4D4A, a coral panel #FF6B4A and a yellow stroke #FFC93C. theme="light" swaps to a cream field #F4E9D8, a teal panel and a coral stroke. accent recolors the panel in dark and the stroke in light.
Can the number contain letters or punctuation?
No. Only the digits 0 to 9 are drawn; any other character in value is skipped. Put the month or other text in unit (shown on the panel) and label (the one-line caption).
Does it work in portrait?
Yes. When the frame is taller than it is wide, the field takes the top of the frame and the panel sits below it. Square frames use the landscape layout.
How long is it?
The stroke draws from frame 16 to frame 62 at 30 fps (drawDuration, default 46), and with the default seven-word label the last word lands at frame 94. The timing is the same at any frame rate, so a 60 fps composition needs at least 188 frames; the rest holds.
Related effects
- Launch Date: a full calendar drawn with the launch day highlighted.
- Compact Stat: the number counts up instead of being drawn.
- High Score: an arcade or broadcast feel for the figure.