Kerning Snap
Kerning animation for Remotion: loose scattered letters snap one by one into tight kerning and form a gradient serif word, for typography, design-craft or polish beats.
In Remotion, Kerning Snap animates loose, scattered letters that snap one by one into proper kerning and form a gradient serif word. Use it for a beat about typesetting, design craft or polish.
$ pnpm dlx shadcn@latest add @remocn/kerning-snapHow to build this in Remotion
You don't need measureText() or a staggered spring() of your own. Install the component and pass your word:
npx shadcn@latest add @remocn/kerning-snapEach letter's snap is an element in timeline.ts; the snap itself is a Remotion spring(), and the drift and flash ticks use interpolate() over Easing curves. The gradient is one continuous fill across the word, so it only reads whole once every letter is set.
Good to know
- Length: 80 frames of motion at 30 fps (160 at 60 fps) with the default props; the demo plays 120 frames, which adds a hold. The first letter snaps at
firstSnap(30) and the rest follow everyinterval(7) frames, so the word is set at aboutfirstSnap + interval × (letters − 1). The Usage example below is a 60 fps composition, so the numbers it hands to Remotion are doubled, see Frame rate. - Installs:
remotion,@remotion/google-fontsfrom npm, plus the remocn helpersglide,frame-rate,timeline. The shadcn CLI copies the source into your project. - Font: loads Fraunces itself through
@remotion/google-fonts. The layout uses Fraunces metrics, so anotherfontFamilymay set looser or tighter; load any other face in your project. - Gradient: dark is
#FFF4EC→#FFB36B→#E2457A→#8F6BFF, light is#F07A2A→#E2457A→#3D4DFF. There is no prop for the stops:inkswaps the gradient for one solid color, and other stops mean editingTHEMESin the copied file.accentonly colors the flash ticks.
Usage
// src/Root.tsx
import { Composition } from "remotion";
import { KerningSnap } from "@/components/remocn/kerning-snap";
const KerningSnapScene = () => (
<KerningSnap word="Kerning" interval={6} />
);
export const RemotionRoot = () => (
<Composition
id="KerningSnap"
component={KerningSnapScene}
durationInFrames={240}
fps={60}
width={1280}
height={720}
/>
);Letters start scattered and loose across the frame; from the center outward, each one springs into its kerned position every interval frames with a brief flash on the snap ticks, and the gradient fill reads whole once the word is set. Pass word and tune interval for pacing; it ships light and dark through theme.
Props12
| Prop | Type | Default |
|---|---|---|
| word | string"Typeset" The word assembled from loose letters. | |
| interval | number7 Frames between one letter snapping and the next. | |
| firstSnap | number30 Frame the first letter snaps into place; the rest follow every `interval` frames. | |
| accent | string"#3B5BFD" Color of the flash ticks beside the word. | |
| ink | string— Solid text color in place of the gradient fill. | |
| background | string— Background fill; pass "transparent" to drop it. | |
| fontFamily | string"Fraunces" Typeface for the word. Fraunces loads itself; load any other face 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. | |
| theme | "dark" | "light""dark" Ships light and dark. | |
| speed | number1 Playback speed multiplier. | |
- wordstring
The word assembled from loose letters.
Default
"Typeset" - intervalnumber
Frames between one letter snapping and the next.
Default
7 - firstSnapnumber
Frame the first letter snaps into place; the rest follow every `interval` frames.
Default
30 - accentstring
Color of the flash ticks beside the word.
Default
"#3B5BFD" - inkstring
Solid text color in place of the gradient fill.
- backgroundstring
Background fill; pass "transparent" to drop it.
- fontFamilystring
Typeface for the word. Fraunces loads itself; load any other face in your project first.
Default
"Fraunces" - 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 - theme"dark" | "light"
Ships light and dark.
Default
"dark" - speednumber
Playback speed multiplier.
Default
1
Common questions
How do I animate scattered letters snapping into kerning in Remotion?
Install Kerning Snap with npx shadcn@latest add @remocn/kerning-snap and pass word. Letters drift loose, then snap into place one by one with a spring.
Can I change the gradient colors?
Not through props. Pass ink for a solid color, or edit the gradient in THEMES in the copied file.
Related effects
- Tracking In: letter spacing collapses from wide while blur clears.
- Squeeze In: characters appear, then squeeze together.
- Stretch In: a heavy word flies in with smeared letters.
- Ruler Align: a ruler straightens messy letters onto its edge.