Gradient Follow
Gradient Fill · Static · 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 a static 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 — made with TEXT-FX · https://text-fx.app
* 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 58% 66%) 0%, hsl(97 58% 62%) 32%, hsl(124 56% 62%) 62%, hsl(151 52% 58%) 100%);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
filter: drop-shadow(0 0 7px hsl(70 55% 58% / 0.22));
}
HTML
This effect needs the markup below (per-letter spans, SVG defs, or a data-text attribute).
<!-- Made with TEXT-FX · https://text-fx.app -->
<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 58% 66%) 0%, hsl(97 58% 62%) 32%, hsl(124 56% 62%) 62%, hsl(151 52% 58%) 100%);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
filter: drop-shadow(0 0 7px hsl(70 55% 58% / 0.22));
}
</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
- Static
- Browser support
- background-clip:text radial gradient centred on the pointer (--mx/--my).
- Capabilities
- pointer