boxtool.io

CSS Gradient Generator

Create beautiful linear, radial and conic CSS gradients with live preview. Copy as CSS or Tailwind. Free, no login.

Angle

135°

Color Stops

#e8ff000%
#0a0a0a100%
CSS Output
background: linear-gradient(135deg, #e8ff00 0%, #0a0a0a 100%);

Presets

About CSS Gradient Generator

Gradients are one of the most versatile tools in modern UI design — used for hero backgrounds, button states, card overlays, dividers, text fills, and decorative elements. Writing gradient CSS by hand requires knowing exact syntax for angles, positions, and color stops, making a visual editor far more efficient for exploration and iteration.

Our CSS Gradient Generator supports all three native CSS gradient types: linear (directional fades), radial (circular or elliptical emanations), and conic (angular sweeps, useful for pie charts and color wheels). You can add unlimited color stops, drag them to adjust position, and fine-tune angle or center position for radial and conic types. The live preview fills the entire preview panel so you see exactly how the gradient will look at scale.

The output includes both standard CSS (`background: linear-gradient(...)`) and the equivalent Tailwind CSS utility class, making this tool useful for both traditional CSS projects and utility-first frameworks. Copy either version with a single click and paste directly into your stylesheet or JSX component.

How to Use CSS Gradient Generator

  1. 1Select the gradient type — Linear, Radial, or Conic — using the type selector.
  2. 2Click the gradient bar to add color stops; click an existing stop to select and modify it.
  3. 3Change each stop's color using the color picker and adjust its position along the gradient.
  4. 4For linear gradients, drag the angle dial or type an angle in degrees.
  5. 5For radial or conic, adjust the center point position using the X/Y controls.
  6. 6Click "Copy CSS" or "Copy Tailwind" to grab the code for your project.

Use Cases

  • Create hero section background gradients for landing pages and marketing sites
  • Design button hover states with gradient color transitions
  • Build subtle gradient overlays for image cards and featured content sections
  • Generate Tailwind gradient classes for utility-first Next.js or Vite projects
  • Create conic gradients for pie charts, progress rings, or angular design elements
  • Design radial spotlight or glow effects for dark-mode interfaces

Tips

  • Add three or more color stops for richer, multi-tone gradient transitions
  • Radial gradients work well for spotlight effects, button glows, and background depth
  • Copy as Tailwind for instant integration with a Next.js, Remix, or SvelteKit project
  • Use a very subtle gradient (same hue, different lightness) for professional card backgrounds
  • Conic gradients work natively in all modern browsers without vendor prefixes
  • Transparent color stops create gradients that fade in or out over any background

Frequently Asked Questions

A CSS gradient is a smooth transition between two or more colors defined entirely in code — no image file needed. Gradients are rendered by the browser and scale perfectly to any size.

Linear gradients transition colors along a straight line at a given angle. Radial gradients radiate outward from a center point in a circular or elliptical shape. Conic gradients rotate colors around a center point, like the slices of a color wheel.

Click "Copy CSS" and paste the output directly into your stylesheet. You can also apply it inline with the style attribute in HTML.

A color stop defines a specific color at a specific position within the gradient (0% = start, 100% = end). You can add up to 5 stops to create multi-color gradients.

Tailwind CSS supports arbitrary values in square brackets, which lets you use any CSS value directly in a class name. Spaces inside the brackets must be replaced with underscores, which this tool handles automatically.

Yes. For text, combine the gradient with background-clip: text and -webkit-text-fill-color: transparent in your CSS. For borders, use the border-image property or a pseudo-element technique.

Related Tools

Guides & reading

Ad