Text Animations

Inlay

A live shader material poured into real letterforms — molten rock, aurora, chrome, embers, tide. The text stays a real text node at transparent, so it is still selectable, searchable and read aloud exactly once while something genuinely animated fills it.

Install

bun add ogl

Then copy 2 files into your project:

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

Props

PropTypeDefaultDescription
material"molten" | "aurora" | "chrome" | "embers" | "tide""molten"What is poured into the letterforms. Each is a different branch over the same glyph mask, so switching is a uniform change and never a relayout — the type does not move when the material does.
flowSpeednumber0.4Rate the material flows. At zero it sets, which is the only way to judge the fill on its own rather than the motion carrying it.
scalenumber1.6Size of the material's features relative to the type. Under about one the pattern is larger than the word and the letters read as flat colour; over three it turns to grain inside the strokes and the word stops being legible before it stops being pretty.
sweepnumber0.8How long the material takes to pour across the line on mount. The wipe runs in the shader against the glyph's own horizontal position, so it follows the letterforms rather than being a rectangle crossing them. Zero fills instantly.
glownumber0.4Bloom bleeding past the glyph edge. It is sampled from the mask around each fragment rather than by blurring the material, so the halo belongs to the letterform instead of to whatever colour happened to sit next to it. Past about one the letters fatten and the counters close up.
grainnumber0.15Dither over the fill. A smooth gradient inside a letterform bands on an eight-bit display more visibly than almost anywhere else, because there is a hard edge right beside it for the eye to compare against.
warpnumber0.25How far the material drags its own coordinates before it is sampled. This is what turns a moving gradient into something that looks like it is being stirred.
hoverBoostnumber0.6How much the material accelerates and lifts under the pointer. The real text sits underneath at transparent — selection works, a screen reader reads it, a crawler indexes it — so this is decoration on a working headline rather than a replacement for one.
colorAstring (hex)"#a855f7"The material's shadow.
colorBstring (hex)"#38bdf8"The material's light.

What It Demonstrates

Loop
An animation that repeats, a set number of times or infinitely.
Mask
Hiding or revealing parts of an element using a shape or gradient — like clip-path, but with soft, fadeable edges.
Reveal
Content is uncovered gradually, often by animating a clip-path or mask.
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