Text Animations

Molten

Type that melts. Letters sag under their own weight, string out, and fuse into one surface where they touch — because the glyphs are a coverage field cut by a threshold rather than shapes being moved, so two stems raise the coverage between them past the cut and one outline closes over both. The word underneath is a real text node the whole time: selectable, searchable, and read correctly aloud while it runs.

Install

bun add ogl

Then copy 2 files into your project:

  • components/registry/molten/molten.tsx
  • hooks/use-animation-loop.ts

Props

PropTypeDefaultDescription
mode"loop" | "hover" | "hold""loop"What drives the melt. Loop runs unattended; hover melts while the pointer is over the word and reforms when it leaves; hold melts only while the pointer is down, which turns the effect into a control rather than an ambient.
meltnumber0.7How far the glyphs sag at the bottom of the cycle. Past about 0.8 the letterforms stop being readable at the extreme, which is either the point or a bug depending on how long the cycle holds there.
viscositynumber0.55How slowly the material yields — a shaping term on the sag, not a speed. High viscosity means the cap line has barely moved while the baseline is already stringing, which is what separates melting wax from a linear squash.
cyclenumber5.2Time for one full sag and reform. The recovery is deliberately the faster half — a symmetric cycle reads as a loop, an asymmetric one reads as a material.
thresholdnumber0.5Where the coverage field is cut into ink. Below 0.5 the glyphs fatten and neighbouring stems merge early; above it they thin and the melt breaks into droplets sooner. The only control that changes the weight of the type without changing the font.
softnessnumber0.06Width of the cut either side of the threshold. Narrow gives a hard vector edge; wide is what makes two approaching stems fuse into one blob instead of overlapping — this is the gooey merge, and the reason the glyphs are a field and not a mask.
dripnumber0.35Vertical elongation under the sag, so a falling stroke stretches into a string before it separates. At zero the letters slide down intact, which looks like a transform rather than a phase change.
wobblenumber0.5Noise on the displacement. Zero is a clean symmetric melt; above about 0.6 the word stops surviving the bottom of the cycle.
phasenumber0.18How far each column lags the one to its left. At zero the whole line sags as a slab; raise it and the melt travels across the word, which reads as heat arriving rather than as gravity being switched on.
baseColorstring (hex)"#e9e6f2"The type at rest.
meltColorstring (hex)"#a855f7"Mixed in by local displacement, so whatever has moved furthest is hottest. Tying the colour to the field rather than to time means a hover melt and a loop melt colour identically with no second curve.

What It Demonstrates

Morph
One shape smoothly turns into another shape, e.g. Dynamic Island.
Squash & stretch
Deforming an element as it moves to convey weight, speed, and flexibility.
Hover effect
Visual change when the cursor moves over an element.
Loop
An animation that repeats, a set number of times or infinitely.
Idle animation
Subtle motion that plays while an element is just sitting there, waiting to be interacted with.
Compositing
Letting the GPU move or fade an element on its own layer without redoing layout or paint.

Related Components

Appears In