Cooling Type
Typewriter hook line that types out glowing hot and cools down to ink, ending on an italic serif emphasized word and a caret, over a soft shader gradient. A free, MIT-licensed Remotion text animation.
In Remotion, Cooling Type types out a hook line glowing hot and lets each letter cool down to the ink color, ending on an italic serif emphasized word and a blinking caret. Use it for a question or hook at the start of a launch video, over a soft gradient ground.
$ pnpm dlx shadcn@latest add @remocn/cooling-typeHow to build this in Remotion
No need to build a string-slicing typewriter plus interpolateColors(). Install the component and pass your line:
npx shadcn@latest add @remocn/cooling-typeCharacters type in on a schedule from timeline.ts (charFrames apart), and each one cools from the hot color to ink over coolFrames with interpolate() over an Easing curve. Glyph widths are measured before the first frame (held with delayRender). The ground is a live gradients.sh shader from the remocn gsh helper.
Good to know
- Length: 110 frames of motion at 30 fps (220 at 60 fps) with the default props. The demo composition plays 150 frames, which adds a hold. Longer text types for longer: about
charFramesper character. 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 helpersgsh,glide,frame-rate,timeline. The shadcn CLI copies the source into your project. - Font: loads Inter Tight and Instrument Serif italic itself through
@remotion/google-fonts. TheaccentWordis set in Instrument Serif italic;fontFamilychanges only the rest of the line, and the serif face is fixed in the copied file. - Colors in dark: text
#eef3f1, hot#7dffd9, accent#7de8c8; in light: text#141618, hot and accent#2f5bff. Each is a prop. - The shader ground: pass
backgroundwith a solid color, or"transparent", to draw no shader. Thegshhelper is still installed with the component.
Usage
// src/Root.tsx
import { Composition } from "remotion";
import { CoolingType } from "@/components/remocn/cooling-type";
const CoolingTypeScene = () => (
<CoolingType
text="What if your launch video could write itself?"
accentWord="itself?"
charFrames={1.6}
/>
);
export const RemotionRoot = () => (
<Composition
id="CoolingType"
component={CoolingTypeScene}
durationInFrames={300}
fps={60}
width={1280}
height={720}
/>
);Characters type in with a slightly irregular rhythm, each one starting in a hot color and cooling to the ink color; the accent word breathes in as serif italic and a caret finishes the line. Pass text and accentWord, and tune charFrames and coolFrames for pace; it ships light and dark through theme.
The ground is a live gradients.sh shader (GshGround), installed with the component as @remocn/gsh. Pick another look with the ground preset prop.
Props19
| Prop | Type | Default |
|---|---|---|
| text | string"What if your launch video could write itself?" Sentence to type out | |
| accentWord | string"itself?" Word in the text set in serif italic | |
| hot | string— Color of freshly typed characters | |
| accent | string— Color of the accent word and caret | |
| ink | string— Settled text color | |
| background | string— Solid fill in place of the gradient ground; pass "transparent" to drop it. | |
| fontFamily | string"Inter Tight" Typeface for the copy. Inter Tight loads by default; load any other face in your project first. | |
| fontWeight | number300 Weight of the typed copy; the accent word keeps its serif. | |
| glow | number1 Strength of the heat glow around fresh letters; 0 turns it off. | |
| theme | "dark" | "light""dark" Ships light and dark palettes | |
| ground | GshPresetId— Gradient ground preset id | |
| groundParams | Partial<GradientParams>— Partial gradient parameters to tune the ground | |
| startAt | numberBEAT.start Frame the first character appears | |
| charFrames | number1.6 Frames per character before pacing variation | |
| coolFrames | number20 Frames for a character to cool from hot to ink | |
| seed | number5 Seed for the typing rhythm jitter | |
| 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. | |
- textstring
Sentence to type out
Default
"What if your launch video could write itself?" - accentWordstring
Word in the text set in serif italic
Default
"itself?" - hotstring
Color of freshly typed characters
- accentstring
Color of the accent word and caret
- inkstring
Settled text color
- backgroundstring
Solid fill in place of the gradient ground; pass "transparent" to drop it.
- fontFamilystring
Typeface for the copy. Inter Tight loads by default; load any other face in your project first.
Default
"Inter Tight" - fontWeightnumber
Weight of the typed copy; the accent word keeps its serif.
Default
300 - glownumber
Strength of the heat glow around fresh letters; 0 turns it off.
Default
1 - theme"dark" | "light"
Ships light and dark palettes
Default
"dark" - groundGshPresetId
Gradient ground preset id
- groundParamsPartial<GradientParams>
Partial gradient parameters to tune the ground
- startAtnumber
Frame the first character appears
Default
BEAT.start - charFramesnumber
Frames per character before pacing variation
Default
1.6 - coolFramesnumber
Frames for a character to cool from hot to ink
Default
20 - seednumber
Seed for the typing rhythm jitter
Default
5 - 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
Common questions
How do I make a hook line that types out glowing hot and cools to ink?
Install Cooling Type with npx shadcn@latest add @remocn/cooling-type, pass text and the accentWord to set in italic serif. Each letter types in hot and cools to ink.
Which font does the emphasized word use?
Instrument Serif italic, loaded by the component. Change it in the copied file if you need another serif.
Can I drop the shader background?
Yes, pass background with a solid color or "transparent".
Related effects
- Typewriter: a plain typed line with a blinking caret.
- Photo Caret: a line written live with photos orbiting the text.
- Caret Swap: a caret eats one phrase and types another.
- Headline to Line: a headline collapses into a line that keeps typing.