Neumorphism Generator

Create soft-UI neumorphic CSS elements with live preview — adjust color, shadows, blur, and shape style, then copy the ready-to-use CSS instantly.

neumorphism soft ui css generator box-shadow neu design css shadows
Free Client-Side Private

Base

160px
20px

Shadow

16px
20%
32px
145deg

Shape


      
🔒 This tool runs entirely in your browser — your files are never uploaded to any server.

Neumorphism (also written neu-morphism or soft UI) is a design style that creates the illusion of elements extruded from — or pressed into — the background surface. It achieves depth purely through CSS box-shadow: a light shadow on one side simulates a raised edge catching light, and a dark shadow on the opposite side simulates the cast shadow on the surface below. The result is a tactile, almost physical appearance without any gradient textures or images.

This generator lets you tune every parameter with live previews and produces a clean, copy-ready CSS snippet that you can paste directly into your project.

How Neumorphism Works

The core technique uses two box-shadow values on the same element — one lighter than the base color, one darker — offset in opposite directions to suggest a directional light source:

Property Purpose
background Must match the parent surface color exactly
box-shadow (dark offset) Simulates the shadow cast away from the light source
box-shadow (light offset) Simulates the highlight on the side facing the light
border-radius Rounds corners; larger values move toward pill or circle shapes

The light and dark colors are derived mathematically from the base color by adding and subtracting the same intensity delta, ensuring the element always blends naturally with its background.

Shape Variants

Shape box-shadow Type Effect
Flat Outer Element appears to sit on the surface
Concave Outer + concave gradient Surface dips inward in the center
Convex Outer + convex gradient Surface bulges outward like a bubble
Pressed Inset Element appears pushed into the surface

The Flat and Pressed variants use only box-shadow. Concave and Convex add a subtle linear-gradient on the background property that reinforces the curvature illusion.

Controls Explained

Base color is the background color of both the element and its parent container. For neumorphism to work, the parent surface must share this color — the generator sets the preview background automatically to match.

Element size sets the width and height to a uniform square. The preview updates in real time as you drag.

Border radius rounds the corners from 0 (sharp square) to 50 px (rounded rectangle). At a value equal to half the element size, the shape becomes a perfect circle.

Distance controls how far the two shadows are offset from the element center. Larger values suggest a more elevated surface; smaller values create a subtle, close-to-surface look.

Intensity determines how much lighter and darker the two shadow colors are relative to the base. Low values (5–15 %) produce the gentlest effect; higher values (25–40 %) create strong contrast that reads clearly on small screens.

Blur is the blur-radius of each shadow. A blur roughly double the distance value looks natural. Very low blur values make shadows look sharp and unrealistic.

Light angle rotates the light source around the element. 145° matches the convention of light coming from the top-left, which feels familiar to users accustomed to macOS and iOS interfaces. Changing this value is useful for matching an existing design language.

Accessibility Considerations

Neumorphic elements often have low contrast between the element and its background, which can make interactive controls hard to distinguish for users with low vision. When using this style for buttons, form inputs, or other interactive elements, supplement the shadow effect with clear focus rings, distinct active states, and sufficient text contrast. WCAG 2.1 AA requires a minimum contrast ratio of 4.5:1 for normal text and 3:1 for large text against background.

Browser Compatibility

box-shadow is universally supported in all modern and legacy browsers including IE 9+. No prefixes are required. The gradient used in Concave and Convex shapes uses standard linear-gradient() syntax, which is also fully supported.

Tips for Production Use

  • Keep intensity below 25 % on mid-toned base colors to avoid shadows that look artificial.
  • Pair the generated CSS with transition: box-shadow .2s ease create smooth hover and active state transitions.
  • For a pressed button state, switch between the Flat (default) and Pressed (active) snippets in JavaScript based on :active or a toggled class.
  • Neumorphism works best on greyed pastel base colors (#dde1e7, #e0e5ec, #cacfd8). Pure white or saturated hues tend to produce shadows that look dirty or unnatural.
  • Combine with a subtle inner border matching the base color to mask the edge where the shadow meets the element at close viewing distances.

FAQ

Why do I need to match the background color to the element color?

Neumorphism creates depth by making two shadows appear on the surface behind the element, not inside it. If the element color differs from the background, the shadow colors — which are derived from the element base — will not blend continuously with the surface and the illusion breaks.

Can I use neumorphism with dark backgrounds?

Yes. Use a dark base color such as #2d2d2d or #1e1e2e. The generator derives light and dark shadow colors automatically, so reduce the intensity slider to 10–15 % to avoid overly washed-out highlights or jet-black shadows on dark surfaces.

How do I create a circular neumorphic element?

Set the border-radius to exactly half of the element size value. For example, a 160 px element needs a border-radius of 80 px to become a perfect circle.

Does neumorphism work for form inputs and buttons?

Yes, but ensure the default, focus, and active states are visually distinct. A common pattern is Flat for default, Concave for focused input fields, and Pressed for active/clicked buttons.

Why does the color picker affect the preview background as well?

Neumorphism requires the element and its parent surface to share the exact same base color. The generator synchronises both automatically so the preview is always accurate.

Is there a performance cost to complex box-shadow values?

Two-value box-shadow declarations are rendered on the GPU in all modern browsers and have negligible performance cost even on mobile devices. Avoid stacking more than three or four shadows on a single element as that can increase repaint time noticeably during animations.

Report an issue