Register in 30 seconds, save hours

Please log in or sign up to use this feature.

Create neumorphism depth effects with CSS

CSS Neumorphism Generator

Options




Light Direction

Preview

CSS

CSS Neumorphism Generator

Create realistic CSS neumorphism effects with this free, interactive neumorphism generator. Customize the background color, shadow colors, light direction, blur, and shadow positioning, then instantly generate the CSS code needed to recreate the effect in your own website or web project. The generator makes it easy to experiment with soft UI, raised elements, and subtle inset-looking depth without manually calculating complex box-shadow values.

Read more

Using the CSS Neumorphism Generator is straightforward. Adjust the available controls until the preview has the appearance you want, then copy the generated CSS and use it in your project.

  1. Choose a background color: Set the base color of the neumorphic element.
  2. Choose the drop shadow color: Select the color used for the darker shadow, including its alpha/transparency value.
  3. Choose the light source color: Set the color of the highlight created by the light source. The color picker also allows its alpha value to be adjusted.
  4. Adjust the drop shadow: Change the shadow blur, X position, and Y position to control the size and placement of the darker shadow.
  5. Adjust the light source: Set the light blur, light X position, and light Y position to control the highlighted side of the effect.
  6. Set the light direction: Choose the direction from which the simulated light is coming.
  7. Copy the CSS: Once the effect looks right, copy the generated CSS and add it to your stylesheet or element.

How CSS Neumorphism Works

Neumorphism, sometimes called soft UI, creates depth by combining a base background with contrasting light and dark shadows. Instead of using a single shadow, a typical neumorphic design uses two shadows: one darker shadow offset in one direction and a lighter shadow offset in the opposite direction. Together, they make an element appear raised from the surrounding surface.

This generator produces the effect using CSS background-color and box-shadow properties. For example, a generated result can look like:

CSS
background-color: #ffffff;
        box-shadow: -20px 20px 30px #4f4f4f26,
        20px -20px 30px #FFFFFF;

Customizing the Neumorphic Effect

The most important factors in a neumorphic design are the relationship between the background and shadow colors and the direction of the shadows. A darker shadow generally provides the visual depth, while the lighter shadow simulates reflected light. Increasing the blur creates softer edges, while reducing it produces a more defined effect.

Shadow X and Y offsets determine where each shadow appears relative to the element. Changing these values alongside the light direction lets you create different lighting styles. Semi-transparent colors can also produce more subtle results that blend naturally with the background.

Why Use a CSS Neumorphism Generator?

Writing multiple box-shadow values by hand can make it difficult to visualize how each number affects the final design. A visual generator lets you adjust the parameters interactively and see the result immediately. It is useful for buttons, cards, input fields, panels, toggles, and other interface components where a soft, dimensional appearance is desired.

FAQ

What is a CSS neumorphism generator?

A CSS neumorphism generator is a tool that creates CSS for soft, dimensional UI effects using a background color and opposing light and dark shadows. It lets you customize the effect visually and copy the resulting CSS.

What CSS properties does the generator create?

The generated code primarily uses background-color and box-shadow. The box shadow combines the configured darker drop shadow and lighter light-source shadow.

Can I change the transparency of the shadows?

Yes. The shadow and light-source color controls support alpha values, allowing you to create opaque or partially transparent shadows and highlights.

What do the shadow X and Y values control?

The X and Y values control the horizontal and vertical offset of the drop shadow. Changing them moves the shadow relative to the element and changes the perceived lighting and depth.

What does light direction do in neumorphism?

Light direction determines how the simulated light is positioned around the element. It helps control which side receives the lighter highlight and which side receives the darker shadow.

Can I use the generated CSS on a website?

Yes. The generated CSS can be copied and used in your own HTML and CSS projects. You can apply the properties to buttons, cards, containers, inputs, and other interface elements.