Gradient Follow
Gradient Fill · Animated · pure CSS
A multi-hue radial gradient fills the glyphs from a focal point that tracks your cursor, so the color wheel slides under the text as you move.
How it works
Gradient Follow is an animated gradient fill text effect rendered entirely in CSS. It reacts to the pointer through CSS custom properties updated by a tiny inline script.
Controls
Gradient Follow exposes 2 dedicated controls — Hue and Spread — on top of the shared type controls (font, weight, letter-spacing and case). Open it in the generator to tune every value live, then copy the updated CSS.
CSS
/* Gradient Follow — generated with TEXT-FX
* HTML: needs the small pointer-move JS snippet.
* Font: 'Unbounded', sans-serif (load from Google Fonts).
*/
.text-effect {
font-family: 'Unbounded', sans-serif;
font-weight: 900;
letter-spacing: 2px;
text-transform: none;
}
.text-effect {
--mx: 50%;
--my: 50%;
background: radial-gradient(circle at var(--mx) var(--my), hsl(70 95% 66%) 0%, hsl(157 95% 62%) 32%, hsl(244 92% 62%) 62%, hsl(331 85% 58%) 100%);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
filter: drop-shadow(0 0 12px hsl(70 90% 58% / 0.4));
}
HTML
This effect needs the markup below (per-letter spans, SVG defs, or a data-text attribute).
<style>
.text-effect {
font-family: 'Unbounded', sans-serif;
font-weight: 900;
letter-spacing: 2px;
text-transform: none;
}
.text-effect {
--mx: 50%;
--my: 50%;
background: radial-gradient(circle at var(--mx) var(--my), hsl(70 95% 66%) 0%, hsl(157 95% 62%) 32%, hsl(244 92% 62%) 62%, hsl(331 85% 58%) 100%);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
filter: drop-shadow(0 0 12px hsl(70 90% 58% / 0.4));
}
</style>
<div class="text-effect">Your text</div>
<script>
const fx = document.querySelector('.text-effect');
if (fx) {
fx.addEventListener('pointermove', (e) => {
const r = fx.getBoundingClientRect();
if (!r.width || !r.height) return;
fx.style.setProperty('--mx', ((e.clientX - r.left) / r.width) * 100 + '%');
fx.style.setProperty('--my', ((e.clientY - r.top) / r.height) * 100 + '%');
});
fx.addEventListener('pointerleave', () => {
fx.style.removeProperty('--mx');
fx.style.removeProperty('--my');
});
}
</script>
- Category
- Gradient Fill
- Type
- Animated
- Browser support
- background-clip:text radial gradient centred on the pointer (--mx/--my).
- Capabilities
- pointer