Micro-interactions

Intro Animation

A wind front sweeps the wordmark right to left. The instant it reaches a glyph the text hands off to a baseline-aligned field of GPU grain — same pixels, same colour, no seam — which peels crown-first and drifts away as smoke through a curl field. The backdrop opens behind it to reveal the page. Mount it over your app and unmount on onDone.

Install

bun add ogl

Then copy 3 files into your project:

  • components/registry/intro-animation/intro-animation.tsx
  • components/registry/intro-animation/dust-gl.ts
  • hooks/use-animation-loop.ts

Props

PropTypeDefaultDescription
sweepDurationnumber1.9Time the wind front takes to cross the wordmark. Everything downstream is derived from it — the reveal fires at 93.7% of the sweep, so shortening it tightens the whole sequence rather than leaving the plume stranded after a fast wipe.
grainDensitynumber2500Grains sampled per glyph. The sampling stride adapts to font size, so this is a count and not a spacing — a glyph holds roughly this many points whether it renders at 28px or 112px. The performance knob: every grain is one point in a single draw call, and changing it re-rasterizes the word.
windSpeednumber1How hard the wind carries released grains downstream. Each grain keeps its own speed rank, so the motion-blur ghosting on the fastest ones survives turning the wind down — the plume slows without flattening into a uniform sheet.
buoyancynumber1How fast the plume climbs. Lift also feeds the wind shear, so raising it does not just push the dust up — it rakes the risen grains further ahead and bends the plume into a curve instead of a diagonal.
turbulencenumber1Amplitude of the divergence-free curl field the grains are advected through. The field is sampled at each grain's travelling position, so grains meet new eddies as they fly — that is the difference between smoke and shimmer. At zero the dust is pure ballistics.
grainSizenumber1Size of an individual grain. The base covers the sampling stride so the held letter reads as solid ink; push it far below 1 and the handoff starts to show the lattice underneath.
splitIndexnumber6How many characters carry the ink colour before the accent takes over. The tint travels with each grain, so the dust keeps the colour of the letter it came from all the way out.
reveal"split" | "fade" | "none""split"How the backdrop leaves. Split slides two halves apart from the centre line; fade dissolves it in place; none draws no backdrop at all, so the wordmark erodes over whatever is already behind it.
autoplaybooleantrueReplay the sequence on a loop. Off is the real thing: the intro plays once, calls onDone, and returns false to the loop host so it stops costing frames for good.
replayDelaynumber1.2Pause between the plume clearing and the wordmark reassembling. Long enough to read as a fresh entrance rather than a stutter.
inkColorstring (hex)"#e9e7ef"Colour of the leading characters and the dust that comes off them.
accentColorstring (hex)"#a855f7"Amethyst on the characters from the split onward. A uniform, not baked into the grain buffer, so dragging it never re-rasterizes the word.
backgroundColorstring (hex)"#08050e"The field the wordmark sits on and the thing the reveal opens. Its own material rather than a themed surface — an intro that flashes white in a light theme defeats the point of covering the page.

What It Demonstrates

Reveal
Content is uncovered gradually, often by animating a clip-path or mask.
Enter / Exit
The animation an element plays when it's added to or removed from the screen.
Stagger
Animate several items one after another with a small delay between each, creating a cascade.
Page transition
An animation that plays when navigating from one page or route to another.
Perceived performance
The right animation makes an interface feel faster, even when it isn't.
Hardware acceleration
Animating transform and opacity lets the GPU keep motion smooth.
Linear
Constant speed. Avoid for UI; reserve for spinners or marquees.
Reduced motion
Respecting the user's prefers-reduced-motion setting by toning down or removing motion.

Related Components

Appears In