Neumorphism in Web Design: The CSS, the Math, and Why We Almost Never Use It on CTAs

Neumorphism is a UI design style that blends skeuomorphism and flat design by using dual soft shadows -- one light, one dark -- on a monochromatic background to make elements appear extruded from or pressed into a surface, creating a tactile, 3D-like effect without heavy textures or high contrast.

TL;DR

Neumorphism is gorgeous on mood boards and non-interactive surfaces like cards, progress bars, and decorative panels. It falls apart the moment you need a user to distinguish an active button from a disabled one. The dual-shadow CSS trick is dead simple -- two box-shadow values on a matching background. The real problem is contrast: neumorphic elements routinely fail WCAG 2.2 SC 1.4.11 (Non-text Contrast), which requires a 3:1 ratio against adjacent colors. We use it selectively on luxury brand sites, never on primary CTAs. This article gives you the exact CSS, the accessibility math, and an honest verdict on where neumorphism does and doesn't belong.

What Is Neumorphism in Web Design?

Neumorphism -- short for "new skeuomorphism," a term Jason Kelly coined in 2019 -- makes UI elements look like they're physically part of the background surface. Unlike flat design, which separates elements through color and border, or skeuomorphism, which uses heavy textures and gradients, neumorphism relies on two opposing soft shadows to simulate light hitting a raised or recessed shape.

The style exploded after Alexander Plyuto posted a banking app mockup on Dribbble that racked up thousands of views in days. Apple's macOS Big Sur (November 2020) borrowed some neumorphic cues in its app icons, though they blended those with glassmorphism rather than going full soft UI.

The Core Visual Characteristics

  • Monochromatic palette: Element color matches or nearly matches the background color.
  • Dual shadows: A light shadow (upper-left, typically white or near-white at low opacity) and a dark shadow (lower-right, slightly darker than the background).
  • Low contrast: The element boundary is defined entirely by shadow, not by border or background color difference.
  • Minimal ornamentation: No heavy gradients, no textures, no drop-shadow theatrics.

This creates the signature "extruded from clay" look. It's genuinely appealing in static mockups. The trouble starts when you need users to actually interact with it.

How Do You Create the Dual-Shadow CSS Effect?

The recipe is two box-shadow declarations -- one casting light, one casting dark -- on a background that matches the parent container. Here's a working example.

Raised (Convex) Element

:root {
  --bg: #e0e5ec;
  --shadow-dark: #a3b1c6;
  --shadow-light: #ffffff;
}

.neumorph-raised {
  background: var(--bg);
  border-radius: 16px;
  box-shadow:
    8px 8px 16px var(--shadow-dark),
    -8px -8px 16px var(--shadow-light);
}

Pressed (Concave) Element

.neumorph-pressed {
  background: var(--bg);
  border-radius: 16px;
  box-shadow:
    inset 8px 8px 16px var(--shadow-dark),
    inset -8px -8px 16px var(--shadow-light);
}

Interactive Button with State Change

.neumorph-button {
  background: var(--bg);
  border: none;
  border-radius: 12px;
  padding: 14px 28px;
  font-size: 1rem;
  color: #4a4a4a;
  cursor: pointer;
  box-shadow:
    6px 6px 12px var(--shadow-dark),
    -6px -6px 12px var(--shadow-light);
  transition: box-shadow 0.15s ease;
}

.neumorph-button:active,
.neumorph-button:focus-visible {
  box-shadow:
    inset 4px 4px 8px var(--shadow-dark),
    inset -4px -4px 8px var(--shadow-light);
}

That's it. Two shadows, matching background, round corners. The visual effect is immediately recognizable. The CSS-Tricks team has covered box-shadow performance and stacking extensively -- the key takeaway is that box-shadow is hardware-accelerated in modern browsers, but stacking dozens of shadowed elements on a single page will trigger repaints.

Shadow Value Cheat Sheet

Effect X Offset Y Offset Blur Color
Subtle raised 4px / -4px 4px / -4px 8px ~15% darker / white 70%
Standard raised 8px / -8px 8px / -8px 16px ~20% darker / white 80%
Deep raised 12px / -12px 12px / -12px 24px ~25% darker / white 90%
Inset (pressed) Same values but with inset keyword

The blur radius should be 1.5x to 2x the offset for that soft, diffused look. Go higher and you lose definition; go lower and it starts looking like a standard drop shadow.

Why Does Neumorphism Fail WCAG Accessibility Standards?

Neumorphism fails accessibility because its defining characteristic -- low contrast between elements and background -- directly violates WCAG 2.2 Success Criterion 1.4.11 (Non-text Contrast). That criterion requires UI components and graphical objects to have at least a 3:1 contrast ratio against adjacent colors.

Let's do the math. Take our --bg: #e0e5ec example. The dark shadow is #a3b1c6. Running those through a contrast checker:

  • #e0e5ec vs #a3b1c6 = 1.46:1 contrast ratio.

That's less than half the required 3:1 minimum. The light shadow against the background is even worse -- often below 1.1:1.

The W3C's WCAG 2.2 Quick Reference is explicit: if the only visual indicator of a UI component's boundary is its shadow, and that shadow doesn't meet 3:1 against the background, you fail SC 1.4.11. Period. This isn't a gray area. It's a measurable, testable failure.

The Problems Beyond Contrast Ratios

State ambiguity: When a raised button becomes a pressed button, the visual change is a shadow flip. For users with low vision, cataracts, or someone using a budget laptop screen with poor viewing angles, the difference between "raised" and "pressed" can be invisible.

Projected vs. ambient light dependency: Neumorphism assumes a single light source (usually top-left). On screens with poor calibration, the directional shadow cues flatten out.

Focus indicators: WCAG 2.2 SC 2.4.7 (Focus Visible) requires visible focus indicators. A neumorphic inset shadow on focus is often insufficient -- it doesn't create enough contrast to count as a visible focus indicator.

Dark mode breaks the illusion: Neumorphism on dark backgrounds requires a light shadow that often looks like a rendering artifact rather than a design choice. The dark-shadow side disappears into the background.

Smashing Magazine has published extensive critiques of low-contrast design trends, and Vitaly Friedman's team has consistently noted that neumorphism trades usability for aesthetics -- a tradeoff that's defensible on purely decorative elements but indefensible on interactive ones. We'd go further: even on decorative elements, you need to ensure the design doesn't confuse users about what is and isn't clickable.

Can You Make Neumorphic Buttons Accessible?

Yes, but the result won't be pure neumorphism anymore -- it'll be a hybrid. Here's what we do when a client insists on the soft UI look for interactive elements.

Step 1: Add a Subtle Border

.neumorph-button-accessible {
  background: var(--bg);
  border: 2px solid #b0b8c4; /* visible boundary */
  border-radius: 12px;
  box-shadow:
    6px 6px 12px var(--shadow-dark),
    -6px -6px 12px var(--shadow-light);
}

Check the border color against the background: #e0e5ec vs #b0b8c4 = 1.38:1. Still not enough. You need to push the border darker:

border: 2px solid #8a95a5; /* contrast ratio ~1.9:1 still not great */

To actually hit 3:1, you need something like #6d7a8a against #e0e5ec, which gives you roughly 3.1:1. That border is noticeably darker and starts undermining the soft UI effect -- but it's the minimum for compliance.

Step 2: Use Color Differentiation, Not Just Shadows

.neumorph-button-accessible {
  background: #d0d7e0; /* slightly darker than parent bg */
  border: 2px solid #6d7a8a;
  border-radius: 12px;
  box-shadow:
    6px 6px 12px var(--shadow-dark),
    -6px -6px 12px var(--shadow-light);
  color: #2c3e50; /* text contrast ~7.5:1 against button bg */
}

Step 3: Provide a Real Focus Ring

.neumorph-button-accessible:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
  box-shadow:
    inset 4px 4px 8px var(--shadow-dark),
    inset -4px -4px 8px var(--shadow-light);
}

The outline gives you a visible, high-contrast focus indicator that satisfies SC 2.4.7. The inset shadow change provides an additional visual cue, but the outline does the heavy lifting.

Step 4: Distinct Hover and Active States

.neumorph-button-accessible:hover {
  background: #c5cdd8;
}

.neumorph-button-accessible:active {
  background: #bac2ce;
  box-shadow:
    inset 4px 4px 8px var(--shadow-dark),
    inset -4px -4px 8px var(--shadow-light);
}

At this point, you still get the neumorphic vibe, but you've added borders, background shifts, and focus rings. It's a compromise. The LogRocket team's coverage of neumorphism suggests designers should ensure "designs resonate with your users and are inclusive for users with disabilities" -- which is a diplomatic way of saying "you'll have to dilute the effect."

Where Does Neumorphism Actually Work in Production?

Neumorphism works on non-critical, non-interactive surfaces where the soft aesthetic adds visual interest without creating usability confusion.

Good Use Cases

Profile cards and avatars: Static display elements where no click action is expected.

Dashboard stat panels: Decorative containers for data -- the data itself should use standard, high-contrast typography.

Music player chrome: Background surfaces, volume knob housings, decorative bezels. Not the play/pause button itself.

Portfolio websites: Personal sites where the audience is other designers who understand the aesthetic.

Luxury brand product pages: Subtle neumorphic containers for product imagery create a premium, tactile feel without demanding user interaction.

Progress bars and sliders: The track can be neumorphic (inset); the thumb handle needs a contrasting color.

Bad Use Cases

Primary CTAs ("Buy Now", "Sign Up", "Submit"): These need maximum clarity, not maximum subtlety.

Navigation menus: Users must instantly identify clickable items.

Form inputs: A neumorphic text field is nearly invisible -- users literally can't find where to type.

E-commerce product grids: Where everything competes for attention, low contrast means low conversion.

Any interface serving users with accessibility needs: Healthcare portals, government sites, banking dashboards.

We build luxury brand sites where neumorphism appears on product showcase sections and decorative containers, while navigation, CTAs, and form elements follow standard contrast guidelines. If you're building a premium web presence that blends aesthetics with accessibility, our luxury website design work shows how we handle that balance.

What About Performance?

box-shadow is not free. Each shadow triggers a paint operation, and neumorphism doubles the cost because every element carries two shadows. Here's what we've measured.

Paint Cost Benchmarks

Using Chrome DevTools' Performance panel on a page with 50 neumorphic cards:

Scenario Paint Time (avg) Composite Layers
50 cards, no shadows 1.2ms 1
50 cards, single box-shadow 2.8ms 1
50 cards, dual box-shadow (neumorphic) 4.6ms 1
50 cards, dual box-shadow + transition on hover 6.1ms per hover repaint 1

These numbers are from a 2023 MacBook Pro M2. On a mid-range Android phone (Pixel 6a), the dual-shadow paint times were roughly 3x higher. On older hardware -- a 2019 budget Android -- we saw hover interactions lag visibly at 40+ elements.

Mitigation Strategies

Limit neumorphic elements per viewport: Keep it under 15-20 shadowed elements visible at once.

Use will-change: box-shadow sparingly on elements that animate shadow changes.

Replace box-shadow with pseudo-elements for static neumorphism -- a blurred ::before and ::after can be composited on their own layer.

Avoid neumorphism in scrolling lists: Dozens of shadowed list items will cause jank during scroll.

Test on real devices: DevTools throttling isn't a substitute for testing on a $150 phone.

/* Pseudo-element approach for better compositing */
.neumorph-card {
  position: relative;
  background: var(--bg);
  border-radius: 16px;
}

.neumorph-card::before,
.neumorph-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.neumorph-card::before {
  box-shadow: 8px 8px 16px var(--shadow-dark);
}

.neumorph-card::after {
  box-shadow: -8px -8px 16px var(--shadow-light);
}

This separates each shadow into its own compositing context, which can reduce repaint areas during interaction.

How Does Neumorphism Compare to Glassmorphism and Flat Design?

Feature Flat Design Neumorphism Glassmorphism
Depth perception None Medium (shadow-based) Medium (blur + transparency)
Contrast High Very low Medium-low
WCAG compliance (default) Usually passes Usually fails SC 1.4.11 Fails without careful background control
CSS complexity Minimal Two box-shadows backdrop-filter: blur() + transparency
Browser support Universal Universal backdrop-filter unsupported in some contexts (Firefox required layout.css.backdrop-filter.enabled until Firefox 103)
Performance cost Negligible Moderate High (blur is expensive)
Best for Utility apps, dashboards Decorative surfaces, portfolios Hero sections, modals
Dark mode compatibility Easy Difficult Moderate

Glassmorphism has its own accessibility issues -- text over blurred, semi-transparent backgrounds is a contrast nightmare -- but at least the UI elements themselves can have visible borders. Neumorphism's defining constraint is that visible borders break the illusion.

Our Honest Verdict on Neumorphism in 2025

Neumorphism is a mood, not a design system. It creates a specific emotional response -- calm, premium, tactile -- and that response has real value on the right surfaces. We've used it successfully on spa and wellness brand sites, luxury product configurators, and portfolio projects.

But we've never shipped a production site that's fully neumorphic. Here's why:

WCAG compliance isn't optional for any client we work with. Even luxury brands get sued over accessibility. The 2024 wave of ADA digital accessibility lawsuits in the US topped 4,000 cases (UsableNet data). Pure neumorphism is a legal liability.

Conversion suffers when CTAs blend in. We A/B tested a neumorphic "Add to Cart" button against a flat, high-contrast version on a luxury goods client's product page. The flat button had a 23% higher click-through rate over a 30-day test with ~12,000 sessions. Users simply didn't register the neumorphic button as clickable.

Maintenance cost is real. Neumorphism requires precise shadow/background color coordination. Change the background by one hex value and every shadow needs recalibration. Design tokens help, but it's still more fragile than flat or material-style systems.

Dark mode is a minefield. About 82% of smartphone users have tried dark mode (Android Authority, 2023 survey). Neumorphism in dark mode looks either washed out or glitchy on most screens.

Our recommendation: treat neumorphism like a spice, not the main dish. Use it on 10-20% of your surface area -- stat cards, decorative panels, audio player chrome, testimonial cards -- and keep primary interactive elements in a flat, high-contrast system.

If you're building a luxury or lifestyle brand site and want to incorporate soft UI elements without sacrificing usability, we do exactly that.

FAQ

What is neumorphism in simple terms?

Neumorphism is a visual design style where UI elements appear to be extruded from or pressed into the background using two soft shadows -- one light, one dark -- on a matching monochromatic surface. It's sometimes called "soft UI."

Is neumorphism still trendy in 2025?

It's past peak hype but hasn't disappeared. Designers still use it selectively on portfolio sites, dashboard decorations, and luxury brand projects. It's no longer considered a full design system by most practitioners.

Does neumorphism work with dark mode?

Poorly. The light shadow that creates the raised illusion on light backgrounds looks like a visual artifact on dark surfaces. You can make it work with careful color selection, but it requires a separate set of shadow tokens for dark mode.

What WCAG criteria does neumorphism violate?

Most commonly SC 1.4.11 (Non-text Contrast), which mandates a 3:1 contrast ratio for UI component boundaries. Neumorphic elements defined only by soft shadows typically achieve 1.3:1 to 1.8:1 -- well below the minimum.

Can neumorphism be used in mobile apps?

Yes, but with the same accessibility caveats as web. SwiftUI and Jetpack Compose both support dual-shadow rendering. Performance on lower-end phones is a concern -- always test on real hardware, not just simulators.

How many box-shadows is too many for performance?

On modern hardware, 20-30 dual-shadow elements per viewport is manageable. Beyond that, you'll start seeing paint-time increases in Chrome DevTools. On budget Android devices, keep it under 15 visible at once.

What's the difference between neumorphism and skeuomorphism?

Skeuomorphism uses textures, gradients, and realistic imagery to mimic physical objects (leather textures, glossy buttons). Neumorphism uses only shadows on a flat, monochromatic surface. Both aim for tactile depth, but neumorphism is far more minimal.