Building a whole Tailwind app, not just this component?
You just browsed 20 Tailwind text gradient. Untitled UI Pro unlocks 5,000+ components and sections and 250+ page examples for React, styled with Tailwind CSS v4. One licence is a one-time $349 with lifetime updates; teams start at $999.
The most-searched gradient-text pattern — a landing-page H1 whose last line is painted with bg-linear-135 from-* via-* to-* bg-clip-text text-transparent. One class list replaces the original's four-declaration CSS rule, and the same three colour tokens drive the headline, the announcement badge and the primary CTA.
A Web3 protocol card where the gradient headline blooms: a blurred, aria-hidden duplicate sits behind the real text and breathes with animate-ttg02-pulse. Because the bloom is the same gradient clipped to the same glyphs, the glow is multi-coloured — something text-shadow can't do.
An image-free wordmark: Spectr in solid ink, um in a bg-linear-120 gradient, inside a responsive navbar. The specimen row proves the logo is resolution-independent from 20px to 56px — and a dark tile shows the same markup on an inverted surface. Zero HTTP requests, perfectly sharp on every DPI.
An editorial type specimen: three font-black words, each with its own dual-tone gradient, on a white page. w-fit is the quiet hero — it shrinks each block heading to its glyphs so the gradient spans the word, not the viewport.
Hover any link or card and the gradient wipes across the letters from left to right. It's two background layers clipped to the text — a solid ink layer underneath and a gradient layer whose width animates from 0% to 100%. Unlike the original's instant swap, this is a real, interruptible transition.
Every gradient CTA in one panel: a ghost button with a gradient label, a true gradient-border button with rounded corners, and a filled gradient button whose colours slide on hover. The gradient border drops the original's mask-composite pseudo-element for a two-layer padding-box / border-box background — one element, no prefixes.
Newsletter
Enjoying these demos? Get new ones by email.
A short email when a new collection ships. Unsubscribe any time.
A dashboard header where the current page is styled entirely from aria-current="page": a tinted pill, gradient label and a gradient underline that scales in. The script only moves one attribute — every visual lives in aria-[current=page]: and group-aria-[current=page]: variants, so styling and accessibility can never disagree.
A hero where colour flows through one word on a perfectly seamless loop. The gradient is a repeating tile twice the element's width, and animate-ttg08-flow moves it exactly one tile per cycle — fixing the visible jump the CSS original had at the end of every loop. Hover to pause.
A CRT-lit HUD panel: pink, cyan and acid-yellow gradient type with drop-shadow-[0_0_10px_…] neon bloom, a scanline overlay drawn with repeating-linear-gradient, corner brackets and a shimmering sync bar. The CSS original's labels sat at 2:1 contrast; every label here clears 4.5:1 without losing the mood.
A luxury membership card with real metallic gold: an eight-stop bronze → gold → near-white highlight → gold ramp, shared as one --ttg10-gold custom property and applied with bg-(image:--ttg10-gold). The highlight glides slowly across the wordmark and price like light across foil.
A frosted-glass article card floating over drifting colour orbs. Gradient text on glass is a contrast problem — whatever colour blurs through changes the background under every letter — so the headline uses high-lightness stops plus a soft drop-shadow, and the glass falls back to a denser fill via supports-[backdrop-filter:blur(1px)]: where blur isn't available.
A slow-living blog layout in soft rose, sky and mint. Pastels on white are a contrast trap — the original's 60–90% lightness stops measured under 2:1 — so this port keeps the soft feel in the card washes (bg-ttg12-rose/12) and uses deeper, still-gentle oklch stops for the text itself.
Vertical gradients in two flavours: a dark rail of [writing-mode:vertical-rl] labels and two display words that fade top-to-bottom and bottom-to-top with bg-linear-to-b / bg-linear-to-t. The fade uses the opacity modifier on the end stop (to-ttg13-amber/20) so the hue survives as it dissolves.
Text that glows from within: v4's bg-radial-[circle_at_50%_50%] puts the brightest stop at the centre of each word and fades to a deeper edge. Four variants show circle vs ellipse and centred vs off-centre focal points, plus a radial KPI number — the place radial text earns its keep.
Newsletter
Enjoying these demos? Get new ones by email.
A short email when a new collection ships. Unsubscribe any time.
A full-spectrum rainbow from two colour stops. v4's /longer interpolation modifier tells the gradient to travel the long way round the oklch hue wheel, so from-ttg15-start to-ttg15-start sweeps all 360°. The animated twin loops seamlessly, and the tag cloud gets matching gradient borders.
Stroke-only, fill-only and stroke-plus-fill side by side, plus a hollow display word whose outline fills with gradient on hover. Tailwind has no stroke-text utility, so [-webkit-text-stroke:2px_…] and [paint-order:stroke_fill] arbitrary properties do the work — right in the class list.
A three-layer progressive-enhancement reference in pure utilities. Layer 1 is a solid colour every browser renders; layer 2 adds the gradient only inside supports-[background-clip:text]:; layer 3 shows the complete pattern with a not-supports-[…]: underline as a designed fallback — so no engine ever shows invisible text.
The reference the original could only imitate: every utility behind Tailwind gradient text, with the v3 name, the v4 name and the CSS it compiles to — then six live examples rendered by real Tailwind, from bg-linear-to-r through bg-radial, bg-conic and /oklch interpolation.
How gradient text behaves when it wraps — demonstrated, not just described. An editorial article sets a multiline gradient headline and blockquote, then puts the two models side by side: one gradient across the whole block, versus box-decoration-clone giving every line its own full ramp.
One card, two palettes: vivid neon gradients on dark, rich jewel tones on light. Because v4 utilities reference theme variables, the script just flips data-theme and a scoped rule re-points every --color-ttg20-* — headline, logo, chips and toggle all follow. It honours prefers-color-scheme on first load and remembers the choice.
FAQ
Frequently asked questions
How do I make gradient text in Tailwind CSS?
Gradient text uses three utilities working together. Apply a gradient background to the text element — in Tailwind v4 that's a direction utility like bg-linear-13 or bg-linear-120 plus colour stops such as from-indigo-500 via-fuchsia-500 to-rose-500. Then clip that background to the glyph shapes with bg-clip-text, and finally make the actual letters see-through with text-transparent so the clipped gradient shows through. Skip either of the last two and you get a solid-colour block or plain text. The hero heading (demo 01) applies all three to one line of an <h1>, which keeps the heading a real, selectable, indexable <h1> rather than an image. Because everything is a utility on the element itself, there is no wrapper markup and no custom CSS — the gradient paints only the text it is clipped to.
Why is my gradient text showing as invisible, black, or a solid colour?
The usual culprit is a missing or out-of-order utility. bg-clip-text with no text-transparent leaves the solid text colour painted on top of the clipped gradient, so you see the colour, not the gradient; text-transparent with no bg-clip-text clips nothing, so the text vanishes into the element background. You need both. A second cause is the gradient itself being empty: a direction utility like bg-linear-120 with no from-*/to-* stops produces a transparent background, which clips to transparent text — invisible. The third is browser support: if background-clip: text is unsupported the letters fall back to transparent and disappear. Demo 17 guards against exactly this with an @supports layer that keeps a solid colour until clip-text is known to work.
How do I animate a moving gradient across text in Tailwind?
Animating the hue flow means moving the gradient, not the text. Demo 08 makes the background a repeating tile roughly twice the text width — a bg-[length:...] sizing paired with repeating stops — then animates background-position from one tile edge to the next in a keyframe loop. Because the tile repeats seamlessly, the position can reset with no visible jump, giving a continuous flow through the word. The letters stay text-transparent and bg-clip-text throughout; only the background slides. Keep the loop on background-position rather than animating the colour stops, which cannot be interpolated. Add a motion-reduce:animate-none variant so the animation stops for users who ask for reduced motion — a looping colour shift is exactly the kind of continuous movement that variant exists to silence.
Is gradient text accessible to screen readers and low-vision users?
The text stays fully accessible to screen readers because it is still real text in the DOM — text-transparent only affects the visual fill, not the accessibility tree, so the word is announced and selected normally. The real risk is visual contrast for sighted users with low vision: a gradient means the contrast ratio changes letter to letter, and the lightest stop may fail against the background even if the darkest passes. Check the weakest stop, not the average. Demos 11 and 12 are built around this — gradient text on frosted glass and pale pastels on white are both contrast traps, so they keep stops dark enough to stay legible. For the decorative glow in demo 02, the blurred duplicate heading behind the real one is marked aria-hidden so it is not announced twice.
How do I add a fallback for browsers that don't support bg-clip-text?
Demo 17 is a three-layer progressive-enhancement reference built entirely from utilities. Layer one is a plain text-* colour every browser renders — the guaranteed-readable baseline. Layer two adds the gradient plus bg-clip-text and text-transparent inside an @supports (background-clip: text) query (and the -webkit- prefixed form), so the see-through letters only activate where the clip is actually supported. If support is missing, the element never becomes transparent and the solid colour from layer one stays visible instead of vanishing. This ordering matters: declaring text-transparent unconditionally is what causes the invisible-text bug on unsupporting engines. Wrapping the transparency behind the feature query is the safe pattern for any gradient text you ship to a broad audience.
Why does the gradient restart or look muddy when my text wraps to multiple lines?
When gradient text wraps, the gradient is clipped to the element's full box, not to each line — so across a multi-line <p> the colours run continuously top-to-bottom through the whole block, and any single line shows only the slice of the gradient that falls across it. That often reads as muddy, because no one line sees the full sweep. Demo 19 shows this directly on a wrapped editorial paragraph rather than just describing it. The fix depends on intent: use a near-vertical or multi-stop gradient so each line still gets varied colour, keep gradient text to one or two lines for headings, and leave long body copy a solid colour. A horizontal bg-linear-90 on a three-line paragraph is the worst case — each line gets almost the same narrow colour band.
How do I make a rainbow or radial gradient on text with Tailwind v4?
Two demos cover the less obvious gradient shapes. For a full rainbow from only two stops (demo 15), use v4's interpolation modifier — bg-linear-90/longer tells the gradient to travel the longer way around the colour wheel in OKLCH space, so near-identical endpoints sweep through every hue instead of a flat band. For a glow-from-within look (demo 14), use bg-radial-[circle_at_50%_50%] so the brightest stop sits at the centre of the text and darkens outward, rather than the left-to-right flow of a linear gradient. Both still rely on the same bg-clip-text and text-transparent pair; only the gradient utility changes. The /longer modifier and bg-radial-* are v4-specific, so check the cheat sheet in demo 18 for the v3 equivalents before porting older code.
When should I avoid gradient text?
Reach for a solid colour instead of a gradient when legibility or scale is at stake. Long body paragraphs are the clearest no — the multi-line clipping problem (demo 19) muddies the sweep, and a gradient makes dense text slower to read for everyone. Small UI text like captions, labels and fine print loses the gradient to its own size and only risks contrast, so demo 07's active nav link tints a pill and keeps the gradient as an accent rather than painting tiny letters. Avoid it anywhere the lightest stop can't clear a contrast threshold against the background, which is why the glass and pastel demos (11, 12) tune their stops carefully rather than using any palette. Good fits are the opposite: large, short, high-impact type — hero headings, logos, a single emphasised word — where the letters are big enough to show the full gradient and brief enough to stay readable.