Box Shadow CSS Generator
Build box shadows visually and copy the CSS. Adjust offset, blur, spread, and color — drag the shadow handle or use arrow keys to position it.
Settings
Drag the orange handle to move the shadow. Click the stage and use ← ↑ → ↓ (hold Shift for 10px steps).
What this tool does
Box Shadow CSS Generator builds box-shadow CSS with a live preview. Drag the shadow handle to set offset, adjust blur, spread, color, opacity, and inset — then copy the CSS.
Runs entirely in your browser. Customize stage and box backgrounds to preview shadows on light, dark, or checkerboard surfaces.
Why use Box Shadow CSS Generator
- See shadow changes instantly instead of guessing values in DevTools.
- Drag handle and arrow keys for precise X/Y offset.
- Copy ready-to-paste CSS for cards, buttons, and modals.
- Test inset shadows for pressed buttons or wells.
- Free — no extension or Figma plugin required.
How it works
Adjust sliders or drag the orange handle on the preview stage. Toggle stage/box fill between checkerboard and solid colors, then copy the generated CSS.
- Set offset X/Y with sliders or drag the handle.
- Adjust blur and spread for soft or sharp shadows.
- Pick shadow color and opacity.
- Toggle inset for inner shadows if needed.
- Copy the CSS into your stylesheet or component.
Step-by-step instructions
Card elevation for a dashboard UI
- Set a small Y offset (e.g. 4px) and moderate blur (16px).
- Use a dark shadow at 15–25% opacity.
- Preview on a light gray stage.
- Copy CSS to your .card class.
Example
Scenario: A frontend dev prototypes button hover states.
- Creates a default shadow for the resting state.
- Increases blur and spread for hover elevation.
- Copies both CSS blocks into a React component.
FAQs
- Can I get multiple shadows?
- This tool generates one shadow at a time — combine multiple rules in your CSS for layered effects.
- Does it include background-color?
- Yes — the output includes the box background you set in the preview.
- Inset vs outer shadow?
- Check the inset box for inner shadows (e.g. form inputs).
- Works on mobile?
- Yes — sliders and preview work on touch devices; drag may vary by browser.