CSS Gradient & Box Shadow Generator
Create CSS gradients and box shadows, including inset shadows, with a live preview, then copy the CSS into your project. Runs in your browser.
CSS
Shortcuts: Ctrl+Enter run · Ctrl+Shift+C copy result · / search (use ⌘ on Mac)
CSS Gradient and Box-shadow Generator
Build polished gradients and box shadows visually, preview the result live, and copy production-ready CSS without leaving your browser. It helps frontend developers prototype polished surfaces, backgrounds, and depth effects without hand-tuning every CSS value.
What this tool does and who uses it
This turns slider/color-picker adjustments into a copyable CSS background or box-shadow declaration, with a live preview. Two concrete uses: a frontend developer prototyping a button or card's hover-state shadow depth without round-tripping through a stylesheet edit-reload cycle, and a designer-developer pair agreeing on an exact gradient angle and color pair by adjusting it live together before it goes into code.
Worked example
The default gradient settings (linear, 135deg, #2563eb to #14b8a6) produce background: linear-gradient(135deg, #2563eb 0%, #14b8a6 100%);. The default shadow settings (0px, 12px, 24px blur, 0px spread, #0f172a66) produce box-shadow: 0px 12px 24px 0px #0f172a66;.
Common mistakes and edge cases
- Switching to Radial doesn't use the angle slider at all — radial gradients here are always a fixed centered circle, only the two colors change.
- Both gradient types always use exactly two color stops, fixed at 0% and 100% — there's no control to add a third color or reposition a stop. Edit the copied CSS by hand for anything more complex.
- The shadow color field accepts an 8-digit hex value (like the default
#0f172a66) for built-in alpha transparency — if you paste a plain 6-digit hex here expecting a semi-transparent shadow, it will render fully opaque instead.
Keep effects accessible
Use sufficient text contrast over gradients, avoid relying on shadow alone to communicate state, and test the effect against the actual page background and responsive layout.