Tailwind CSS Gradient Class Generator

Tailwind gradient utility class combinations

Ad placeholder (leaderboard)

Build Tailwind gradients fast

This generator outputs ready-to-paste Tailwind CSS gradient utility classes. Tailwind builds gradients from a direction plus up to three color stops, and getting the class names exactly right by hand is fiddly. Pick a direction and colors — or randomise — and copy a valid className string in one click.

How it works

A Tailwind gradient is composed of three pieces:

bg-gradient-to-{direction}  from-{color}-{shade}  via-{color}-{shade}  to-{color}-{shade}

The direction maps a human choice to a suffix: to right becomes -r, to bottom-right becomes -br, and so on. Each stop combines a palette color (blue, emerald, rose…) with a numeric shade (50900). The via- stop is optional; omitting it gives a clean two-color blend. For example:

<div class="bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500">…</div>

Tips and notes

  • Keep the from, via and to shades within one or two steps for smooth blends; large jumps create hard bands.
  • For a text gradient add bg-clip-text text-transparent to the same element.
  • Tailwind v4 users can swap bg-gradient-to-r for bg-linear-to-r; both compile to the same CSS.
Ad placeholder (rectangle)