Gradient Link
Interactive & Advanced · Static · pure CSS
A clean neutral heading that crossfades into a soft gradient on hover — the understated fill-with-color-on-hover treatment from modern docs and marketing links.
How it works
Gradient Link is a static interactive & advanced text effect rendered entirely in CSS. A data-text attribute mirrors the word into ::before/::after layers, so copy that attribute together with the CSS.
Controls
Gradient Link exposes 2 dedicated controls — Hue and Hue Shift — 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 Link — generated with TEXT-FX
* HTML: the element needs a data-text attribute equal to its text.
* Font: 'Bricolage Grotesque', sans-serif (load from Google Fonts).
*/
.text-effect {
font-family: 'Bricolage Grotesque', sans-serif;
font-weight: 700;
letter-spacing: 4px;
text-transform: none;
}
.text-effect {
position: relative;
color: hsl(219 14% 86%);
cursor: pointer;
}
.text-effect::before {
content: attr(data-text);
position: absolute;
inset: 0;
background: linear-gradient(100deg, hsl(219 70% 70%), hsl(278 64% 64%));
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
opacity: 0;
transition: opacity 0.35s ease;
pointer-events: none;
}
.text-effect:hover::before {
opacity: 1;
}
HTML
This effect needs the markup below (per-letter spans, SVG defs, or a data-text attribute).
<style>
.text-effect {
font-family: 'Bricolage Grotesque', sans-serif;
font-weight: 700;
letter-spacing: 4px;
text-transform: none;
}
.text-effect {
position: relative;
color: hsl(219 14% 86%);
cursor: pointer;
}
.text-effect::before {
content: attr(data-text);
position: absolute;
inset: 0;
background: linear-gradient(100deg, hsl(219 70% 70%), hsl(278 64% 64%));
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
opacity: 0;
transition: opacity 0.35s ease;
pointer-events: none;
}
.text-effect:hover::before {
opacity: 1;
}
</style>
<div data-text="Your text" class="text-effect">Your text</div>
- Category
- Interactive & Advanced
- Type
- Static
- Browser support
- Crossfades to a gradient on :hover via a data-text copy — resting state is neutral.
- Capabilities
- dataText