Web design styles - depth and material
Neumorphism web design
Neumorphism, short for new skeuomorphism, makes buttons and cards look as if they’re pressed out of the page itself. Everything shares the background colour, and depth comes from a light shadow on one side and a dark shadow on the other. It looks soft and calm, and it’s also the style most likely to fail an accessibility check, so this guide spends as much time on fixing it as building it.
A live example
This sample page is built with this page’s own CSS. Switch to the common mistake to see why neumorphism has a reputation for hiding its buttons.
Spring trips
Plan your next weekend away
Pick a city, choose your dates and we’ll put the whole trip in one place.
Stays
Hotels and flats near where you’ll be. Pick by area, price or how close you are to the station.
Find a stayDone well: the main button has a real colour, links are coloured and underlined on hover, body text is dark enough to read, and focus gets a solid outline.
What makes it neumorphism
One colour
Cards, buttons and the page all use the same background colour.
background: #e4e8eeTwo shadows
A dark shadow on one side and a light one on the other make shapes look raised.
9px 9px 18px, -9px -9px 18pxPressed states
Flip both shadows inwards and the shape looks pushed into the page.
box-shadow: inset ...Soft corners
Generous rounded corners and plenty of space between elements.
border-radius: 24pxThe CSS
The two-shadow rule is the style. The rest of this snippet is what makes it usable: a real colour on the main action, a focus outline, and an edge for people who’ve asked for more contrast.
:root {
--surface: #e4e8ee;
--shadow-dark: #c2c7cf;
--shadow-light: #ffffff;
}
.neu {
background: var(--surface);
border-radius: 24px;
box-shadow:
9px 9px 18px var(--shadow-dark),
-9px -9px 18px var(--shadow-light);
}
/* Pressed or selected: flip the shadows inwards */
.neu-pressed {
box-shadow:
inset 4px 4px 8px var(--shadow-dark),
inset -4px -4px 8px var(--shadow-light);
}
/* Give the main action a real colour, so it reads as a button */
.neu-button-primary {
background: #3949ab;
color: #ffffff;
}
.neu-button:focus-visible {
outline: 2px solid #3949ab;
outline-offset: 4px;
}
/* An edge for people who have asked for more contrast */
@media (prefers-contrast: more) {
.neu { border: 1px solid #6b7280; }
}Tuning the values
| Property | A good starting range | What goes wrong outside it |
|---|---|---|
| Background lightness | Mid-light greys and pastels | On pure white there’s no room for the light shadow. On dark colours the effect turns muddy. |
| Shadow offset | 4px to 12px | Smaller and shapes look flat. Larger and the light shadow spreads into neighbouring elements. |
| Shadow blur | About twice the offset | Too sharp and it looks like a bevel. Too soft and the shape disappears. |
| Text colour | Dark grey or near black | Mid-grey text on a grey page is the style’s most common failure. |
When it works
- Small, focused interfaces such as music players, smart-home controls and calculators.
- A few hero elements on an otherwise conventional page.
- Brands that want to feel calm and tactile.
When to avoid it
- Forms, checkout and anything where people need to find the next action quickly.
- Data-heavy dashboards, where low contrast makes tables and charts hard to scan.
- Sites that have to meet strict accessibility requirements, unless you’re ready to adapt the style heavily.
The hard part
Making neumorphism accessible
The style’s whole idea is that shapes are the same colour as the page, which works against how accessibility guidelines ask you to show what’s clickable. WCAG asks for 3:1 contrast on whatever shows a control is there, usually its edge or fill, and a soft shadow on a matching background rarely gets there. You can keep the look and still pass, but you have to add things back.
Colour the main action
Use a real accent colour on primary buttons and leave the soft grey for secondary ones.
Darken the text
Body text needs 4.5:1 against the surface. On
#e4e8eethat means something like#4a5260or darker.Add a visible edge
A 1px border at 3:1 makes controls findable without spoiling the look. Add it at least for
prefers-contrast: more.Show focus with an outline
A change of shadow isn’t enough to show focus. Use a solid outline with an offset.
What to check when you review a neumorphism site
Neumorphism looks finished long before it works. These are the problems clients run into first, often without being able to say why.
.neu-button1. Which shapes can be clicked
If buttons, cards and decorative panels all share the same soft shadow, people can’t tell them apart. Ask someone new to the site to find the main action.
.neu { box-shadow }2. Contrast on the edges of controls
Buttons and inputs need 3:1 contrast against the page for whatever marks them out, usually their edge. Check this on a real screen with the brightness turned down.
p, .d-text3. Grey text on grey
Body text needs 4.5:1. Pale grey on a pale grey surface is the style’s most common failure.
.neu-pressed4. Pressed and selected states
A toggle that’s on and one that’s off can look almost the same. Check that selected states also change colour, an icon or a label.
:focus-visible5. Focus outlines
A slightly different shadow doesn’t show keyboard focus clearly. Tab through every control and look for a solid outline.
@media (prefers-contrast: more)6. High-contrast settings
Turn on increased contrast in your operating system and check the site adds borders rather than staying soft.
input7. Form fields
Inset fields with no border and grey placeholder text are very hard to spot. Check every field has a visible edge and a real label.
:root8. Dark mode
The two shadows need retuning on dark backgrounds. If the site has a dark theme, check every component in it.
Reviewing with clients
Notes on the button nobody realised was a button
When a client can’t find a button, they usually say the page is "confusing", which doesn’t help you fix it. With ClickNote, clients click directly on elements of the website and leave a note, without creating an account or installing a browser extension.
Send your client a review link for the page.
They click the shape they weren’t sure about and say what they expected.
You get the selector, a screenshot and their device, so you can go straight to the right rule in your CSS.
I didn’t realise this was something I could click. It looks like the rest of the text.
tablet · Safari on iPad - 820 x 1180
.d-card > .d-linkReviewing a site in one of these styles?
Send your client a review link and they can click directly on elements of the website and leave a note, without creating an account or installing a browser extension. You get the selector, a screenshot and their device with every note.
14-day free trial. No card needed. See pricing.