Shadow Studio

Generator & Visualizer

Use drop-shadow()
Gradient Shadow
Inner Layer
distance 20px
blur 40px
opacity 15%
AAA17.85:1

CSS Box Shadow Generator - Smooth, Layered and Animated Shadows

Generate layered CSS box shadows, neumorphism, glassmorphism and animated effects. Export to Tailwind, React Native, Flutter and Styled Components. Free, instant, no signup required.

Shadows as Light: Falloff, Blur, and Spread

A box-shadow declaration encodes a physical light setup. The offsets place an imaginary light source: a positive y offset means the light sits above the element, which is why elevation shadows fall downward. Blur radius approximates the penumbra, the soft transition between full shadow and full light that a real area light produces. Spread approximates the umbra, the dark core, by growing or shrinking the silhouette before blurring it.

Realistic depth almost never comes from a single shadow. Physical scenes have a key light casting a tight, directional shadow and ambient bounce casting a wide, faint one. The studio's smooth mode encodes this directly: for layer i of six, the y offset is distance * (i / 6), the blur is blur * (i / 6), and the opacity is opacity / i. The first layer is a tight contact shadow hugging the element; the sixth is a broad wash far below it. Because opacity falls off as 1/i while blur grows linearly, the stack reproduces the inverse-square character of real light: intensity drops fastest near the object while the penumbra widens with distance. This key-plus-ambient decomposition mirrors Material Design's elevation model, and it is why the smooth tab's output looks more natural than any single 0 20px 40px declaration with matched totals.

When tuning by hand, keep the layers' roles separate: small blur with higher opacity for the contact layer so edges feel grounded, and a blur two to four times the offset with single-digit opacity for the ambient layer so the lift feels airy.

box-shadow Layers vs filter: drop-shadow()

box-shadow and filter: drop-shadow() look interchangeable on a plain rectangle, but they follow different geometry, and choosing wrong produces a specific class of bug. box-shadow paints from the element's border box: it respects border-radius, supports spread to inflate the silhouette, and supports inset to carve the shadow inside the box. drop-shadow() instead samples the rendered alpha channel, so it follows the visible pixels, including text glyphs, transparent PNGs, and clip-path cutouts, none of which box-shadow can do.

That distinction decides the tool. If the shadow must hug an irregular silhouette, a display-font headline, an SVG logo, or a card with a clipped corner, drop-shadow() is the correct primitive. If you need inset, spread, or a shadow that ignores transparent holes in the content, box-shadow is the only option. The studio exposes both and converts between them: toggling drop-shadow rewrites each layer as drop-shadow(x y blur color), dropping spread and stripping inset, since the filter has neither. Multiple box-shadow layers comma-separate in one property; multiple drop-shadow() calls chain as space-separated filters, each applying to the previous result.

Two side effects matter before shipping the filter form: filter establishes a containing block for positioned descendants, and drop-shadow() promotes the element to its own composited layer, a win for animation but a memory cost on large elements. See box-shadow vs drop-shadow, the box-shadow syntax guide, and the box-shadow cheatsheet for the full comparison and every value.

Deriving Neumorphic Tints from the Surface Color

Neumorphism works only when the shadows are tinted versions of the surface itself. A card on a #e0e5ec background needs a darker #e0e5ec shadow and a lighter #e0e5ec highlight. Pure black and white at 20% break the illusion: the card reads as a gray box with ordinary drop shadows instead of a surface with carved relief. The studio computes the tints arithmetically so hue never drifts.

The math is simple. Given a surface color and an intensity value, the tool shifts every RGB channel by the same amount: amount = round(intensity * 2.5), then light tint L = surface + amount and dark tint D = surface - amount, clamped per channel. Shifting all three channels equally preserves the hue exactly: a warm beige surface produces warm beige shadows, a cool slate surface produces cool slate shadows. The angle slider feeds dx = distance * cos(angle) and dy = distance * sin(angle), placing the dark shadow at (dx, dy) and the light shadow at (-dx, -dy).

The four shape modes reuse the same tints. Flat and convex place the shadows outside the element, differing only in whether the surface carries a subtle gradient. Pressed moves both inside with inset, inverting the reading so the element looks carved in. Concave and convex add a 145-degree linear-gradient across the surface using amount * 1.5 tints, so the face carries the lighting direction the shadows imply. Keep the equal-channel shift and symmetric amounts; asymmetric tints are the most common reason a neumorphic composition looks dirty instead of soft. Low-contrast neumorphism can fail WCAG checks, so verify interactive elements against the studio's contrast score before shipping.

Porting Shadows: React Native vs Flutter

CSS shadows do not map one-to-one onto mobile platforms. The studio exports both, but each platform's limits decide how much of your design survives.

React Native splits shadow rendering by platform. On iOS, shadowColor, shadowOffset ({width, height}), shadowOpacity, and shadowRadius work as a set and map cleanly from CSS values. On Android, all of those props are ignored: Android renders shadows solely from the elevation prop, a single number, and the system draws its own key-plus-ambient pair with no control over color, offset, or blur. The studio's React Native export approximates elevation from your blur (blur / 3 in smooth mode, blur / 2 in classic mode), but the tint and direction you designed will not appear on Android.

Flutter is the opposite: its BoxShadow mirrors the CSS layer model. Each shadow takes color (ARGB, emitted as Color(0xAA...) from your hex plus opacity), offset (Offset(dx, dy)), blurRadius, and spreadRadius, and a boxShadow list accepts multiple layers exactly like a comma-separated box-shadow. One subtlety: Flutter defines the blur sigma as blurRadius * 0.57735 + 0.5, so a numeric port of a CSS blur value yields a slightly softer shadow; scale accordingly for pixel parity. The harder limit is that BoxShadow has no inset parameter, so the Inner Depth and Deep Pressed presets need a custom painter or an inner-shadow package. The glow button and hover lift card gallery pieces show these layered shadows in real components.

Frequently Asked Questions

That is the specified painting order. Inset shadows paint above the background and borders but below content. If one is hidden, a child with an opaque background is covering it; make the child transparent or move the shadow onto the child.
The `drop-shadow()` filter accepts only offset-x, offset-y, blur-radius, and color. It has no spread and no inset, because it operates on the rendered alpha channel rather than the border box. Designs needing spread or inset must stay with `box-shadow`.
Not with `BoxShadow`, which has no inset flag, and the standard widget set has no drop-shadow-style filter primitive either. Inset effects need a `CustomPainter` or a third-party inner-shadow widget.
Each layer adds opacity to the same region, so similar layers accumulate into flat gray. Differentiate them: small blur with higher opacity for the contact layer, large blur with single-digit opacity for the ambient layer, and widen the offset gap as you add layers. Word count: 1199

Design Shadows From Light Physics, Not Guesswork

Shadow Studio removes the guesswork from CSS box shadows. Whether you need a premium multi-layer effect for your landing page, a neumorphic button for your dashboard, or a glassmorphic card for your app, the tool delivers production-ready code in every format you need.

Free to use. No signup. No limits.

In-depth guide

CSS Box-Shadow Guide: Syntax, Layered Shadows & Realistic Depth

Master layered shadows, realistic depth, inset effects, and Tailwind techniques with copy-paste examples.

Read the guide

Keep exploring