CSS Gradient Generator
Design linear, radial and conic gradients visually. Drag colour stops, preview on any shape, copy CSS or Tailwind in one click.
Presets
Type
Direction
Color Stops
.gradient {
background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
}How it works
Pick a preset or type
Start from a preset or choose linear, radial or conic from scratch.
Edit colour stops
Drag handles on the gradient bar. Click to add, delete to remove.
Preview & copy
See it on backgrounds, cards, buttons or text — then copy CSS or Tailwind.
Common places this gets used
Hero backgrounds and dividers
Hero section backgrounds and section dividers are probably the most frequent use. A subtle linear gradient between two near-neutral tones adds depth to a page without looking overdone. Conic gradients are popular for decorative blob shapes placed behind content.
Button and card hover states
Button and card hover states benefit from gradients too. A shift in angle or saturation on hover adds visual feedback without needing JavaScript. The button preview mode lets you test it before copying the code.
Gradient text headings
Text gradients are increasingly common in headings. Switch the preview to Text mode, find a combination that works, and copy the output — the tool generates the background-clip snippet alongside the gradient so you get everything you need in one paste.
Frequently asked questions
What types of CSS gradients can I create?
Linear gradients (with any angle), radial gradients (circle or ellipse), and conic gradients. All support unlimited colour stops with drag-to-reposition handles.
How do I add or remove colour stops?
Click anywhere on the gradient bar to add a new stop at that position. Select a stop and click the delete icon to remove it. You need at least two stops.
Can I use the output with Tailwind CSS?
Yes. Switch to the Tailwind tab for class-based output. Linear gradients map to from-*, via-*, to-* utilities. Radial and conic gradients fall back to CSS since Tailwind has no built-in support.
How do I use gradient on text?
Switch the preview to Text mode to see it live. In your code use background with the gradient, then add background-clip: text and -webkit-background-clip: text, and set color: transparent.
Can I animate a CSS gradient?
CSS gradients cannot be animated with transition directly, but you can animate background-position on a gradient that is larger than its container to create a moving effect. Another approach is to cross-fade two overlapping gradient elements using opacity in a @keyframes animation.
Does conic gradient work in all browsers?
Conic gradient has good support in modern browsers but was not supported in older Firefox versions (before version 83). If you need broader compatibility, linear and radial gradients are the safer choice. The live preview in this tool shows exactly what your output will look like.
Can I use a gradient as a border?
Not directly with border-image in every scenario, but there is a reliable workaround: set the gradient as the background of a wrapper element, then layer the inner element with a solid background and a small inset. This creates the illusion of a gradient border and works across all modern browsers.