CSS Box Shadow & Gradient Generator
Build CSS box-shadow and two-color linear-gradient code with a live preview, then copy the generated CSS into your stylesheet.
What this tool does
Build a CSS box-shadow or a two-color linear-gradient with a live sample. Copy the generated CSS declaration into your stylesheet and test it in the actual layout.
Practical use cases
- Tune the shadow of a card
- Create a two-color hero background
- Compare gradient angles without editing a stylesheet repeatedly
Example
Input: Gradient mode with two colors and a 135-degree angle
Expected output: A linear-gradient declaration using the selected colors and angle
Limits to know
- The preview is a sample element, not your entire page
- The tool does not assess text contrast or accessibility
- It does not generate a multi-layer shadow editor or arbitrary gradient stops
Common problems
The shadow is clipped
Check overflow settings and surrounding spacing on the real parent element.
Text is hard to read on the gradient
Test foreground/background contrast across the entire text area and change the colors if needed.
Frequently asked questions
What CSS does the tool generate?
A single box-shadow declaration in pixels, or a background declaration with a two-color linear-gradient at the chosen angle. Colors are written as hex values.
What ranges can I use?
Offsets go from −50 to 50 px, Blur from 0 to 100 px, Spread from −30 to 30 px and Angle from 0 to 360°. For other values, edit the copied CSS by hand.
Can I make an inset shadow, several shadows or a gradient with more colors?
No. The tool builds one outer shadow or a two-color gradient. You can add the inset keyword, extra shadow layers or more color stops to the copied CSS yourself.
Can I set transparency on the shadow color?
Not with the color picker, which only produces solid hex colors. For a softer shadow, pick a lighter color or change it to an rgba() value in your stylesheet.
Tool-specific privacy note
Style values and previews are computed locally; no stylesheet is uploaded.
How to use this tool
- Choose shadow or gradient mode.
- Adjust the offsets, blur and spread for a shadow, or colors and angle for a gradient.
- Copy the CSS and inspect the result on the target element.