U
UITLY
UI Shadow Elevation Generator

Free UI Shadow Elevation Generator | Box Shadow Scale & Tailwind Config

Generate a complete, mathematically consistent shadow elevation system for your design system. Control blur, spread, opacity, and offset growth curves then export CSS variables and a Tailwind config extension ready to paste into your project.

3–10 Level Scales

Generate 3 to 10 elevation levels with mathematically growing blur, spread, opacity, and offset values

Live Preview

See every elevation level rendered as a real UI card on light and dark backgrounds as you adjust each parameter

CSS + Tailwind Output

One-click copy for CSS custom properties with utility classes, and a complete Tailwind boxShadow config extension

Build Your Shadow Elevation System

Start with a preset (Material Design, Soft UI, Sharp Depth, Glow), then fine-tune blur growth, spread, opacity, and offset curves. Every parameter change updates the preview and code output in real time.

Shadow Elevation Generator

Start with a preset:

6

Blur

2px
×4

How fast blur increases per level

Spread

0px
0px/step

Opacity

14%
+4%

Offset

0px
1px
2px/step

Live Elevation Preview

Level 1

Level 2

Level 3

Level 4

Level 5

Level 6

LevelBlurSpreadOpacityOffset YPreview
L12px0px14%1px
L26px0px15%3px
L314px0px16%5px
L426px0px16%7px
L542px0px17%9px
L662px0px18%11px

When to use each level

L1–L2Subtle lift cards, list items, input focus
L3–L4Raised dropdowns, tooltips, floating labels
L5–L6Elevated dialogs, popovers, date pickers

CSS Custom Properties + Utility Classes

:root {
  --shadow-1: 0px 1px 2px 0px #00000024;
  --shadow-2: 1px 3px 6px 0px #00000026;
  --shadow-3: 2px 5px 14px 0px #00000028, 1px 2px 6px 0px #00000010;
  --shadow-4: 3px 7px 26px 0px #0000002a, 1px 2px 10px 0px #00000011;
  --shadow-5: 4px 9px 42px 0px #0000002c, 1px 3px 17px 0px #00000012;
  --shadow-6: 5px 11px 62px 0px #0000002e, 2px 3px 25px 0px #00000012;
}

/* Utility classes */
.shadow-elevation-1 { box-shadow: var(--shadow-1); }
.shadow-elevation-2 { box-shadow: var(--shadow-2); }
.shadow-elevation-3 { box-shadow: var(--shadow-3); }
.shadow-elevation-4 { box-shadow: var(--shadow-4); }
.shadow-elevation-5 { box-shadow: var(--shadow-5); }
.shadow-elevation-6 { box-shadow: var(--shadow-6); }

What This Generator Produces

4 Shadow Presets

  • Material Design layered ambient + key shadows
  • Soft UI colored offset shadows with spread
  • Sharp Depth tight, high-contrast shadows
  • Glow Effect centered colored glow shadows

Full Parameter Control

  • Blur base and growth curve
  • Spread base and per-step delta
  • Opacity range and growth rate
  • X/Y offset base and growth

Code-Ready Output

  • CSS :root block with --shadow-N variables
  • Utility classes for direct use
  • Tailwind theme.extend.boxShadow block

No account required — 100% free

The Complete Guide to Shadow Elevation Systems in UI Design

Most codebases handle shadows the same way they handle border radii: one engineer copies a box-shadow value from Stack Overflow, another finds something that "looks right" in the inspector, and a third picks something from a design tool. Six months later, the product has eleven different shadow values across forty components, none of them related, none of them consistent. This tool generates a mathematically coherent shadow system in two minutes so you ship depth, not chaos.

What Is Elevation in UI Design?

Elevation is the visual metaphor that places UI components at different heights above the surface they sit on. A card at elevation 2 sits slightly above the page surface. A dropdown at elevation 4 sits noticeably above both the card and the page. A modal at elevation 8 sits highest of all far above everything else. This vertical hierarchy communicates interaction priority: the higher the elevation, the more the element demands attention.

Shadows are the primary visual cue for elevation. As an element rises, its shadow grows larger (more blur), spreads wider, and grows slightly more transparent because real light sources cast softer, more diffuse shadows on objects that are farther away. The most realistic shadow systems use two shadow layers per elevation level: a key shadow (directional, tight, higher opacity) and an ambient shadow (undirected, soft, lower opacity), mirroring the behavior of real-world lighting with a dominant light source and diffuse ambient light.

Material Design approach

Google's Material Design popularized the layered shadow model with explicit elevation levels (0–24dp) mapped to specific shadow values. Each level uses two shadows: a key shadow (y-offset dominant) and an ambient shadow (soft, low opacity). This creates the most physically accurate depth illusion.

Neumorphism / Soft UI approach

Soft UI uses offset colored shadows (often matching the background tint) to create an extruded appearance. Instead of simulating overhead lighting, it simulates light from a fixed diagonal direction, creating a raised button or pressed inset effect.

Flat + subtle approach

Many modern SaaS products use minimal shadows — a single-pixel border with a very light drop shadow at level 1, growing to a modest diffuse shadow at level 3 for modals. This approach prioritizes color contrast over shadow depth for visual hierarchy.

Glow / colored shadow approach

Increasingly popular in dark-mode-first products, colored glows replace neutral shadows. A blue primary button casts a blue glow. A green success state glows green. The effect reinforces semantic color meaning while adding dimensionality.

Why Consistent Shadows Matter More Than You Think

Inconsistent shadows are invisible to most users they can't articulate what feels wrong. But they feel it. When a tooltip has a tighter, darker shadow than the modal it sits inside, the depth hierarchy inverts: the tooltip appears to sit lower than the modal, which contradicts its stacking order. Users resolve this cognitive dissonance by trusting the interface less, even without knowing why.

For engineers and designers, inconsistent shadows create maintenance debt. When shadows aren't tokenized, every new component becomes a judgment call. Shadow values spread across dozens of files, and any rebrand or theme change requires a full audit and manual update of every instance. A token-based shadow system reduces that to a single file change.

How the Shadow Scale Generator Works

The generator uses parametric curves to grow each shadow property as elevation increases, rather than requiring you to specify every level manually. Here's what each parameter controls:

  • Blur base and growth: The base blur applies at level 1. The growth rate controls how fast blur expands per level using a quadratic curve this matches how real shadows soften exponentially as objects rise, not linearly.
  • Spread base and growth: Negative spread (inset) creates a tighter, more precise shadow. Positive spread creates a diffuse glow effect. Growth controls how spread changes per level useful for creating shadows that expand more dramatically at higher elevations.
  • Opacity base and growth: Counterintuitively, shadows on higher-elevation elements should be slightly more transparent, not darker because diffuse light from multiple angles fills the shadow area. The growth rate lets you model this correctly by keeping opacity modest at high levels.
  • Offset X and Y with growth: Directional shadows (positive Y offset) simulate overhead lighting. Zero offset creates centered glows. The growth rate increases offset at higher levels, amplifying the sense of physical distance from the surface.
  • Layered shadows toggle: When enabled, the generator adds a second ambient shadow layer at 40% of the primary shadow's values. This mimics Material Design's dual-layer system and creates significantly more realistic depth at levels 3 and above.

Implementation Guide: Using Your Shadow Scale

Option 1: CSS Custom Properties (Any Stack)

Paste the CSS output into your global stylesheet. Reference elevation variables anywhere in your CSS:

.card { box-shadow: var(--shadow-2); }
.dropdown { box-shadow: var(--shadow-4); }
.modal { box-shadow: var(--shadow-7); }

/* Or use the generated utility classes directly */
<div class="shadow-elevation-3">...</div>

Option 2: Tailwind Config (Next.js / React)

Merge the Tailwind output into your config. Your shadow tokens become utility class names:

{/* Semantic elevation via named Tailwind classes */}
<div className="shadow-elevation-2">Card</div>
<div className="shadow-elevation-4">Dropdown</div>
<div className="shadow-elevation-7">Modal backdrop</div>

Option 3: Dark Mode Overrides

On dark backgrounds, shadows with high opacity become invisible (dark on dark). Override your shadow tokens for dark mode to use lighter or higher-opacity values:

[data-theme="dark"] {
  /* Reduce opacity — shadows need less contrast on dark surfaces */
  --shadow-1: 0px 1px 3px 0px #ffffff14;
  --shadow-4: 0px 4px 16px 0px #ffffff20;
  /* Or use color-mix() in modern CSS */
}

One critical implementation detail: shadows interact with background colors. A pure black shadow (#000000) at 15% opacity is nearly invisible on a dark background. On white, it's a strong shadow. On colored surfaces, it creates a muddy tint. Always preview your shadow scale on the actual background color your components will use which is exactly why this tool includes a dark/light background toggle.

Shadow Elevation Best Practices from Production Systems

Never skip elevation levels

If your card uses level 2 and your modal uses level 8, components that logically sit between them (dropdowns, tooltips, popovers) must use levels 4–6. Skipping creates visual gaps in your depth hierarchy that users perceive as inconsistency.

Use 3–6 levels for most products

10-level shadow systems are rarely necessary. Most products need: none (flat), subtle (cards), raised (dropdowns), elevated (dialogs), overlay (modals). Five levels cover 95% of real use cases. More levels add complexity without meaningful visual differentiation.

Match shadow color to brand or background

Neutral shadows (#000000) are the safe default. Tinted shadows (brand-colored, or darkened from the surface color) create more polished results because they don't appear as pure gray blobs. A blue-tinted shadow on a white surface looks intentional; pure black looks like a default.

Test performance with shadow-heavy UIs

box-shadow renders on the CPU in older browsers and forces repaints on scroll. For performance-critical UIs (long virtualized lists, infinite scroll), consider using filter: drop-shadow() instead of box-shadow, or pre-rendering shadows as pseudo-element backgrounds that don't trigger repaint.

Frequently Asked Questions

How many shadow elevation levels does a design system need?+

Most products need 4–6 semantic levels: 0 (flat/no shadow), 1–2 (subtle lift for cards and list items), 3–4 (raised for dropdowns and tooltips), 5–6 (elevated for dialogs and sheet components), and 7+ (overlay for modals and full-screen panels). Ten-level systems make sense for component libraries that need to accommodate many different product contexts, but a standalone product rarely uses more than 6 meaningfully distinct elevations. Fewer levels, used consistently, create more visual coherence than many levels used arbitrarily.

What is the difference between box-shadow and filter: drop-shadow() in CSS?+

box-shadow applies to the element's border box regardless of its shape a rounded card gets a shadow on its rectangle, not its visible shape. filter: drop-shadow() follows the element's actual rendered alpha channel, including transparent gaps in a PNG icon or the exact curves of an SVG. Use box-shadow for rectangular components (cards, buttons, inputs). Use drop-shadow() for icons, SVGs, images with transparency, and components where the shadow should follow the visible shape. Importantly, box-shadow supports the spread parameter while drop-shadow() does not.

How do I create a proper dark mode shadow system?+

Dark surfaces absorb shadows a pure black shadow on a dark gray surface is nearly invisible. Dark mode shadow systems typically use one of three approaches: (1) Increase shadow opacity for dark surfaces (going from 14% to 30–40%), (2) Add a subtle lighter-than-surface overlay color to elevate components instead of shadows (Material Design 3's approach), or (3) Use colored glows that contrast against the dark background. The most maintainable approach is to define your shadow scale as CSS custom properties and override the values in a dark-mode selector, giving you independent control over light and dark shadow systems.

Should I use a single-layer or multi-layer shadow system?+

Multi-layer shadows (two or more box-shadow values per level) produce significantly more realistic depth than single-layer shadows. The industry standard is two layers: a key shadow that simulates the dominant directional light source (typically above and slightly in front of the user), and an ambient shadow that simulates diffuse light from all directions. Material Design's elevation system uses this approach. The main trade-off is CSS complexity each shadow becomes a comma-separated list rather than a single value. This tool's 'layered shadows' toggle lets you compare both approaches.

How do shadows affect web performance?+

box-shadow is a CSS painting property that triggers repaint when animated or changed on scroll. It renders on the GPU in modern browsers, but complex shadows (especially blurred, large-spread values) increase paint time. For performant shadow animations (hover effects, scroll-responsive elevation), use the will-change: box-shadow property to pre-promote the element to its own compositor layer. For virtualized lists with many elevated cards, benchmark your repaint budget with Chrome DevTools before shipping a high-blur shadow system large blur radii on many elements simultaneously can drop frame rates below 60fps on lower-powered devices.

A consistent shadow system takes less than five minutes to build with the right tool, and it pays dividends every time a new component is designed or a theme needs updating. Generate your elevation scale above, paste the output into your project, and eliminate shadow inconsistency permanently.

Free forever · No account · CSS & Tailwind output

21 Free Tools No Signup Required

Your Complete Design & Optimization Suite

Every tool runs entirely in your browser no uploads, no servers, no accounts. Fast, private, and free forever.

Design Tools

Colors, typography, CSS, SVG & more

Color Palette Generator

Popular

Generate beautiful color schemes using color theory algorithms monochromatic, complementary, triadic, and more.

  • 6 harmony types with HEX/RGB/HSL
  • One-click copy & unlimited palettes
  • WCAG accessibility contrast checking

Gradient Generator

Build stunning CSS gradients visually linear, radial, and conic and copy production-ready code instantly.

  • Linear, radial & conic gradients
  • Live CSS output with copy button
  • Unlimited color stops & angle control

Font Pairing

Discover expert Google Fonts combinations curated for optimal readability and aesthetic harmony.

  • 800+ professional pairings by mood
  • Live preview with custom text
  • Direct Google Fonts integration

CSS Generator

Generate production CSS visually flexbox, grid, typography, border, and box shadow with live preview.

  • Flexbox & Grid layout builder
  • Typography, border & shadow controls
  • CSS + Tailwind utility output

SVG Editor

Upload, edit, optimize, and convert SVG files entirely in your browser. Export clean SVG or React JSX.

  • Edit fill, stroke, dimensions, viewBox
  • Remove metadata & minify up to 70%
  • Convert SVG to JSX component

Favicon Generator

Generate favicons in all required sizes from any image PNG, ICO, and Apple Touch icons in one click.

  • All sizes: 16×16 to 512×512
  • ICO, PNG & Apple Touch export
  • No upload required 100% in browser

Design Token Generator

Build a complete design token system colors, spacing, typography, and shadows and export JSON or CSS variables.

  • Color, spacing & typography tokens
  • JSON & CSS custom property export
  • Tailwind config extension output

Optimization & Analysis

Images, accessibility, spacing & readability

Image Optimizer

Popular

Compress images up to 90% smaller WebP, AVIF, JPEG, PNG with filters, cropping, and rotation. 100% private.

  • WebP/AVIF/JPEG/PNG compression
  • Precision crop, rotate & filters
  • 100% client-side no uploads

Background Remover

AI

Remove image backgrounds instantly using on-device AI no uploads, no account. Download transparent PNG.

  • AI-powered accurate removal
  • Works on people, products & objects
  • Runs entirely in your browser

UI Shadow Generator

Generate a mathematically consistent shadow elevation system and export CSS variables or Tailwind config.

  • 3–10 elevation levels with live preview
  • 4 presets: Material, Soft, Sharp, Glow
  • CSS custom properties + Tailwind output

UI Spacing Scale

Build a harmonious spacing scale based on mathematical ratios and export it as CSS or Tailwind config.

  • Major second, golden ratio & more
  • Live ruler visualization per step
  • CSS & Tailwind spacing export

Border Radius Checker

Preview and compare border radius values in real time across multiple shapes and sizes.

  • Individual corner control
  • Live shape preview with real UI elements
  • CSS & Tailwind output

Color Contrast Checker

Check foreground/background color contrast ratios against WCAG AA and AAA accessibility standards.

  • WCAG AA & AAA compliance check
  • Live preview with real text samples
  • Suggested accessible color alternatives

UI Readability Analyzer

Analyze typography readability font size, line height, measure, and contrast with actionable improvement tips.

  • Flesch-Kincaid readability scoring
  • Font, spacing & contrast analysis
  • Actionable improvement suggestions

Links & Marketing

URLs, QR codes, tracking & security

URL Shortener

Links

Shorten any URL instantly with browser history, QR code export, and zero server tracking.

  • Instant URL shortening
  • Browser history & QR export
  • Zero server tracking

QR Code Generator

Custom QR codes for URLs, WiFi, vCards & more. Add colors, logo, download PNG or SVG.

  • URL, WiFi, vCard & more types
  • Custom colors & logo upload
  • PNG & SVG export

UTM Builder

Marketing

Build GA4-ready UTM tracking URLs with smart presets, validation, and CSV history export.

  • GA4-ready UTM parameters
  • Smart presets & validation
  • CSV history export

URL Cleaner

Privacy

Strip 50+ tracking parameters (UTM, fbclid, gclid, msclkid) with before/after comparison.

  • Removes 50+ tracking params
  • Before/after comparison view
  • One-click clean & copy

Link Preview Generator

SEO

See how your URL appears on Twitter, Facebook, LinkedIn & WhatsApp. Check OG metadata.

  • Social media preview simulation
  • OG metadata extraction
  • Card validator

Password Generator

Security

Cryptographically secure passwords, passphrases & PINs. All generated locally — never sent anywhere.

  • Crypto-secure generation
  • Passphrases & PINs supported
  • 100% local processing

Bio Link Builder

Creator

Build a link-in-bio page with live mobile preview, custom themes, and downloadable HTML.

  • Live mobile preview
  • Custom themes & styling
  • Downloadable HTML export

All tools are 100% free forever

No account, no subscription, no hidden limits. Every tool processes your data locally in the browser.

More tools added regularly