
Neumorphism Is Just Two Box Shadows and a Flat Background
The neumorphic design trend that swept Dribbble in 2020 looks complex but reduces to a simple CSS pattern. Two box shadows on a colored background that matches the element create the illusion of extruded or inset surfaces. The CSS pattern .neumorphic { background : #e0e0e0 ; border-radius : 20px ; box-shadow : 8px 8px 16px #bebebe , -8px -8px 16px #ffffff ; } That is the entire technique. A light shadow on one side (simulating a light source) and a dark shadow on the opposite side (simulating a shadow). The background color must match the parent container's background. Why the background match matters Neumorphism only works when the element's background is the same color as its container. The illusion is that the element is extruded from the surface, like pushing clay up from a flat sheet. If the element has a different background color, the extrusion illusion breaks and it just looks like a card with two shadows. body { background : #e0e0e0 ; } .neumorphic-raised { background : #e0e0e
Continue reading on Dev.to Tutorial
Opens in a new tab




