What is the Gradient Text Generator?#
The Gradient Text Generator fills text with a gradient and gives you the CSS to reproduce it. Enter a heading, choose a font and colors, and the preview updates as you type. The result is a .gradient-text rule built on background-clip: text, ready to paste into a stylesheet.
The text you enter is for the preview only. The copied CSS styles a class, so the same snippet works for any element you apply it to.
How to Use#
- Enter the text you want to preview.
- Set the font, weight, size, and letter spacing.
- Build the gradient yourself or start from a preset: pick a type, adjust its angle or origin, and arrange the color stops.
- Copy the CSS.
The preview background (Light or Dark) only changes how the preview looks, so you can check the gradient on a light or dark page.
Settings#
- Text: The text to preview, shown on one line. Long text wraps to the next line.
- Font and weight: A system font or one of the Google fonts. The weights you can pick follow the chosen font.
- Size and letter spacing: The font size and the space between letters, both in pixels. Negative letter spacing tightens the text.
- Presets: Ready-made gradients. Choosing one replaces the current gradient.
- Gradient: Linear, radial, or conic, with color stops you can add, move, and delete.
- Preview background: Light or Dark, for checking the gradient on different page tones. It is not part of the output.
Common Use Cases#
- A hero heading that fades from one brand color into another.
- Gradient titles on a landing page or feature section.
- Text that picks up the colors of a logo or a product theme.
- A reusable gradient-text class for headings across a site.
FAQ#
No. The CSS only defines the gradient-text class. The text itself lives in your HTML, so you add the class to whatever element you want to style.
Paste the snippet into your stylesheet and add the gradient-text class to the element. If you already use that class name for something else, rename the selector in both places.
At the very top of your stylesheet, before any other rules. The import only loads when it comes first. If you load the font another way, such as a link tag, you can drop the line entirely.
The output is static CSS. To animate it, add your own keyframes and shift the background position on the element.