Neumorphism CSS Generator
Generate neumorphic (soft UI) CSS with light and dark shadows on a matching background.
background: #e0e5ec;
border-radius: 16px;
box-shadow: 6px 6px 12px rgb(157, 160, 165), -6px -6px 12px rgb(255, 255, 255);6px 6px 12px rgb(157, 160, 165), -6px -6px 12px rgb(255, 255, 255)#e0e5ecAbout This Tool
Neumorphism looks deceptively simple until you try to hand-write the dual box-shadow values and realize the math is finicky.
This generator gives you sliders for size, radius, distance, intensity, and blur, then writes the CSS you can paste straight into a stylesheet. Toggle between the inset (pressed) and outset (raised) variants without re-deriving the shadow values yourself.
The key insight built into the defaults: neumorphism only works when the surface color is close to the page background. The tool nudges you toward sensible base colors and warns when contrast gets too low for accessibility. The output is plain CSS, no preprocessor or framework dependency.
The math under the sliders is two CSS box-shadows applied to the same element. The first shadow is offset toward the bottom-right with a darker color (the cast shadow); the second is offset toward the top-left with a lighter color (the highlight). Both use the same blur and roughly equal magnitude. When the surface color sits between the two shadow colors, the eye reads the element as raised from the page. Invert the offsets — light bottom-right, dark top-left — and you get the inset version, which reads as pressed in.
The reason this is hard to write by hand is that all four numbers (two offsets, two colors, blur) have to relate proportionally. Get the offset wrong relative to the blur and the highlight crushes against the edge. Get the colors wrong and the element looks dirty rather than soft. The generator nudges the values together so you can drag one slider and the others stay sensible.
What goes wrong without thinking carefully: accessibility. Neumorphism's whole aesthetic depends on subtle contrast — buttons that almost blend into the background. That's the same as 'buttons that fail WCAG.' If you're shipping this in a real product where any portion of users have low vision or just bright sunlight on their phone, you'll get complaints. The honest pattern is to use neumorphism for decorative surfaces and add a clear focus ring, an explicit border, or a text label with high contrast for actionable elements. The style is fine; the implementation has to work harder than a flat-design implementation does.
One adjacent concept: glassmorphism. Same era of UI fashion, different mechanism — backdrop-filter: blur() on a translucent surface to fake frosted glass. Both share the trait of looking great in mockups and creating accessibility headaches in production. If you're choosing between them, glass actually has more wiggle room because the contrast comes from the content behind, which you can control.
The about text and FAQ on this page were drafted with AI assistance and reviewed by a member of the Coherence Daddy team before publishing. See our Content Policy for editorial standards.