Ink Underline
Hand-drawn ink underline for Remotion: a brush stroke drags itself under a handwritten headline, URL or stat in a few stop-motion steps, timed after the writing.
In Remotion, Ink Underline adds a hand-dragged ink stroke that draws itself under a handwritten headline in a few stop-motion steps. Set its delay from handwriteDuration() and it starts right after the writing finishes; use it under a URL, a stat or a title in a paper or scrapbook scene.
$ pnpm dlx shadcn@latest add @remocn/ink-underlineHow to build this in Remotion
You don't need @remotion/paths, evolvePath() or an SVG filter for this. Install the component:
npx shadcn@latest add @remocn/ink-underlineThe stroke is an SVG brush ribbon sampled from a seeded curve, revealed on the remocn stop-motion clock in discrete poses, so it moves in the same choppy steps as handwrite. Its single schedule entry lives in timeline.ts: the drag starts at delay and lasts durationSteps × step frames.
Good to know
- Length: 120 frames of motion at 30 fps (240 at 60 fps) with the default props. The stroke itself only takes
durationSteps × stepframes (15 with the defaults) afterdelay; the rest of the 120 is hold. The Usage example below is a 60 fps composition, so the numbers it hands to Remotion are doubled, see Frame rate. - Installs:
remotionfrom npm, plus the remocn helpersstop-motion,brush,frame-rate,timeline. The shadcn CLI copies the source into your project. - No font: the stroke is drawn, not typed.
delay,stepandhandwriteDuration()all count 30 fps frames on the scene clock, so passinghandwriteDuration(text)asdelaylines up at any composition frame rate.- Width: the stroke is
widthpixels long and does not measure the text above it. Give the underline the same width as the box the headline sits in, as the Usage example does.
Usage
The stroke renders in normal flow — a block of width by thickness + 4 — so it
stacks under text in a flex column. Pair it with handwrite and start the drag
the moment the writing finishes:
// src/Root.tsx
import { AbsoluteFill, Composition } from "remotion";
import { Handwrite, handwriteDuration } from "@/components/remocn/handwrite";
import { InkUnderline } from "@/components/remocn/ink-underline";
const url = "remocn.dev";
const InkUnderlineScene = () => (
<AbsoluteFill
style={{
background: "#f1eee7",
alignItems: "center",
justifyContent: "center",
flexDirection: "column",
gap: 4,
}}
>
<div style={{ position: "relative", width: 420, height: 96 }}>
<Handwrite text={url} fontSize={64} />
</div>
<InkUnderline width={420} delay={handwriteDuration(url)} />
</AbsoluteFill>
);
export const RemotionRoot = () => (
<Composition
id="InkUnderline"
component={InkUnderlineScene}
durationInFrames={120}
fps={60}
width={1280}
height={720}
/>
);Handwrite centres itself inside its nearest positioned ancestor, which is why
it sits in a sized position: relative box here. The underline needs no such
box — it is a block in the flow.
The wobble in the stroke comes from seed: the same seed always draws the same
curve, and changing it gives a different hand. durationSteps is how many
stop-motion poses the drag takes, so the real length in frames is
durationSteps * step.
Props10
| Prop | Type | Default |
|---|---|---|
| widthrequired | number— Stroke length in pixels | |
| color | string"#6f7f35" Ink colour (any valid CSS color) | |
| thickness | number9 Brush width in pixels at full pressure | |
| pressure | number1 Weight the brush lands on, as a fraction of thickness | |
| release | number0.15 Weight the brush lifts off at; below pressure it thins into a dry tail | |
| grain | number1 Edge roughness; breaks the thin tail into dry-brush flecks, 0 gives clean edges | |
| delay | number0 Frames on the local clock before the drag begins | |
| durationSteps | number5 Stop-motion poses the drag takes | |
| seed | string"ink" Seed for the curve wobble — same seed, same stroke | |
| step | number3 Frames per stop-motion pose — the tempo control | |
- widthrequirednumber
Stroke length in pixels
- colorstring
Ink colour (any valid CSS color)
Default
"#6f7f35" - thicknessnumber
Brush width in pixels at full pressure
Default
9 - pressurenumber
Weight the brush lands on, as a fraction of thickness
Default
1 - releasenumber
Weight the brush lifts off at; below pressure it thins into a dry tail
Default
0.15 - grainnumber
Edge roughness; breaks the thin tail into dry-brush flecks, 0 gives clean edges
Default
1 - delaynumber
Frames on the local clock before the drag begins
Default
0 - durationStepsnumber
Stop-motion poses the drag takes
Default
5 - seedstring
Seed for the curve wobble — same seed, same stroke
Default
"ink" - stepnumber
Frames per stop-motion pose — the tempo control
Default
3
Common questions
How do I add a hand-drawn ink underline under a handwritten headline in Remotion?
Install Ink Underline with npx shadcn@latest add @remocn/ink-underline, place it under the text in a flex column and set delay={handwriteDuration(text)} so the drag starts when the writing ends.
Is handwriteDuration in frames?
Yes, in 30 fps frames on the scene clock, the same unit delay uses, so it fits any composition frame rate.
Related effects
- Marker Highlight: a marker block painted behind a phrase inside a sentence.
- Handwrite: pen-written text on the same stop-motion clock.
- Hand Count: a number rewritten by hand at each step.