// free ยท runs in your browser ยท nothing uploaded
CSS Gradient & Shadow Generator
Design CSS gradients (linear, radial, conic) and layered box shadows with a live preview, then copy the CSS or a Tailwind class. Share your design with a link.
๐ Official sources: MDN gradients ยท MDN box-shadow
We build every tool from the official rules and re-check them when they change. Always confirm with the official source before you rely on a result.
๐ ๏ธ Spotted a mistake or an out-of-date rule? Tell us
How it works
The generator writes the CSS for what you set up: the gradient type, angle and colour stops in order, or one or more shadow layers with offset, blur, spread, colour and opacity. Colours with opacity are written in rgb() with an alpha. It also gives the same value as a Tailwind arbitrary class, with spaces turned into underscores.
Example: a 135ยฐ indigo-to-pink gradient
background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%); bg-[linear-gradient(135deg,_#6366f1_0%,_#ec4899_100%)]
Good to know
- Gradients between two very different hues can look grey in the middle; adding a third stop in between keeps it bright.
- Large blurred shadows are costly to paint on scroll; on long lists, keep them small or apply them only on hover.
Guides
Related tools
Questions people ask
How do I use the CSS?+
Copy the line and paste it into your stylesheet, for example on a .card or .hero class. For Tailwind, paste the arbitrary value class (like bg-[linear-gradient(...)]) into your className.
Linear, radial or conic?+
Linear goes in a straight line at the angle you choose. Radial spreads out from the centre in a circle. Conic sweeps around the centre like a colour wheel or pie chart.
Why use several shadow layers?+
Real shadows are soft and sharp at the same time. A tight, faint layer plus a large, blurred one looks far more natural than one heavy shadow.