Build a hero for a type conference called Kerning Days, Ghent 2027, where the letters of the headline get heavier as the cursor comes near. Warm off-white background #f2efe8 with a faint 48px grid, ink #141210, electric blue accent #2a4bff. Top row: a 13px uppercase blue label with a ring icon, and on the right a small monospace readout "wght" with a 90px bar and the current heaviest weight. Headline "Type that / leans in." on two lines, 168px on desktop and 52px or 14vw on phones, weight 300, using the system variable font stack "Segoe UI Variable Display", system-ui, -apple-system, Roboto. Split each letter into a span. Measure every letter centre once at weight 300, then each frame set its weight with a Gaussian falloff from the pointer, 300 far away to 900 underneath, radius 230px on desktop and 115px on phones, eased 20% a frame. Letters above weight 510 shift from ink towards blue. Under a 2px rule: two facts, "14 to 16 May" and "22 speakers", and a pill button "Get a pass, from €90". Use pointer events with touch-action none on the headline so dragging works, and after 2s idle a ghost pointer drifts across the letters. Reduced motion shows a fixed weight swell instead.
Written by Informeek Studio to recreate this design. Prompts are not deterministic, so running it again gives a similar result, not an identical one.
Use it in three steps
- Copy the prompt with the button above.
- Paste it into your AI site builder, or any AI chat that writes code.
- Make it yours by setting your own headline and choosing the lightest and heaviest weights.
About this variable font animation
A variable font animation shows off the one thing variable fonts do that static fonts cannot: move smoothly through every weight in between. Here each letter of the headline sits at a hairline 300 until the pointer comes near, then swells towards 900 and turns blue at its heaviest, so the word under your cursor looks as if it has been pressed into the page.
No font file is downloaded. Modern systems ship variable fonts already, Segoe UI Variable on Windows and San Francisco on Apple devices, so the effect is free. On an older system the weights step rather than glide, and the page still reads perfectly well.
Why the prompt works
- It measures letters once at the lightest weight, which stops the layout chasing itself as letters widen.
- It names the falloff, a Gaussian curve with a radius for desktop and one for phones.
- It adds a weight readout, a small designer touch that explains what is happening.
- It covers touch, idle and reduced motion with a drag, a ghost pointer and a fixed swell.
Where to use it
Type foundries, design events, studio homepages and any headline that should feel tactile. Short lines in large sizes show the weight change best.
The prompt is shared under CC BY 4.0. Reuse it freely, including commercially, with a credit linking back to this page.