Box Shadow Generator
Build layered CSS box shadows with a live preview, plus neumorphism and glassmorphism styles.
.box {
border-radius: 16px;
box-shadow: 0 10px 15px -3px rgb(15 23 42 / 0.1),
0 4px 6px -4px rgb(15 23 42 / 0.1);
}shadow-[0_10px_15px_-3px_rgb(15_23_42/0.1),0_4px_6px_-4px_rgb(15_23_42/0.1)]
About this tool
The CSS box-shadow property draws one or more shadows around an element. Each shadow has a horizontal and vertical offset, a blur radius, an optional spread, a color and an optional inset keyword for inner shadows. Shadows are how flat interfaces show depth: they separate cards from the page, lift buttons and dropdowns, and show which element has focus.
This generator lets you stack as many shadow layers as you need and see the result live on a box whose color, background and corner radius you control. Realistic shadows usually combine two or more layers, so the presets include soft card shadows and a five-layer smooth shadow. Two extra modes build complete neumorphism (soft UI) and glassmorphism styles, and you can paste an existing box-shadow to edit it. The output is plain CSS plus a Tailwind arbitrary value.
How to use Box Shadow Generator
- Pick a preset or start from the default layer. Use Add layer to stack more shadows.
- Select a layer and adjust its offsets, blur, spread, color and opacity. Tick Inset for an inner shadow.
- Change the box color, background and corner radius to match your design, or switch to Neumorphism or Glassmorphism.
- Copy the CSS rule or the Tailwind class. To edit an existing shadow, paste it into Import CSS.
Examples
Layered card shadow
Preset “Raised” (two layers)
box-shadow: 0 10px 15px -3px rgb(15 23 42 / 0.1), 0 4px 6px -4px rgb(15 23 42 / 0.1);
The negative spread keeps the shadow from showing on the sides, so the card looks lifted towards the viewer.
Neumorphism on #e0e5ec
Distance 10px, blur 20px, intensity 15%
box-shadow: 10px 10px 20px #bec3c9, -10px -10px 20px #ffffff;
Import an existing shadow
0px 4px 6px rgba(0, 0, 0, 0.1)
0 4px 6px rgb(0 0 0 / 0.1) Tailwind: shadow-[0_4px_6px_rgb(0_0_0/0.1)]
What each value does
- Offset X and Y move the shadow. Positive Y puts it below the element, as if light came from above, which is what users expect.
- Blur softens the edge. Larger blur with lower opacity looks more natural than a small, dark blur.
- Spread grows or shrinks the shadow before blurring. A negative spread with a larger Y offset keeps the sides clean and gives a lifted look.
- Color with alpha: use a dark, slightly tinted color (for example your text color) at 5–25% opacity instead of pure black at full strength.
- Inset draws the shadow inside the border box, useful for pressed buttons, input fields and inner glows.
- Several shadows are separated by commas. The first one is drawn on top.
Neumorphism and glassmorphism
Neumorphism, or soft UI, makes an element look extruded from the page with one dark shadow bottom-right and one light shadow top-left. It only works when the element and the background share the same color, and it naturally has low contrast, so pair it with clear text, icons and focus states if you use it for controls.
Glassmorphism imitates frosted glass: a semi-transparent background, backdrop-filter: blur(), a thin light border and a soft shadow. It needs a colorful background behind the element to have any effect. backdrop-filter is supported by all current browsers; keep the -webkit- prefix for Safari, and make sure the text stays readable on every part of the background.
Frequently asked questions
Everything you need to know about this tool and data security.
How do I make a shadow on only one side?
Combine an offset towards that side with a negative spread equal to or larger than the blur, for example 0 8px 6px -6px for a bottom-only shadow. The negative spread hides the shadow on the other sides.
What is the difference between box-shadow and filter: drop-shadow()?
box-shadow follows the rectangular border box (including border-radius). drop-shadow() follows the actual visible pixels, so it works for transparent PNGs, SVG icons and clip-path shapes, but it has no spread and no inset option.
Do many shadow layers slow the page down?
A few static layers are cheap. Animating box-shadow forces repaints, so for hover effects it is smoother to put the shadow on a pseudo-element and animate its opacity instead.
Is my data safe when using this tool?
Yes, 100% safe. This tool operates entirely inside your web browser using client-side JavaScript and WebAssembly. Your data never touches any external server.
Related Tools
Design linear, radial and conic CSS gradients visually and copy the CSS or Tailwind classes.
Draw clip-path polygons by dragging points, start from 15 shapes, or generate a classic CSS border triangle.
Try every flexbox and CSS grid property on live boxes and copy the CSS or Tailwind classes.
Featured Projects tech-fun.net
Explore more AI & productivity tools
Nihongo GameBox
Master Japanese typing, Kana, and JLPT N5–N1 vocabulary through interactive retro arcade games.
ResumeGPT
Tailors CVs and cover letters to every job opportunity with a multi-agent LLM pipeline, job tracking, and scheduled discovery.
CollectMind
Turns your bookmarks into a searchable AI knowledge base — entirely on-device, powered by Chrome's built-in Gemini Nano.