Shadows
Simulated light, which reads as physical only when it follows one consistent light source.
Definition
A shadow implies that a surface is raised above the one behind it. Convincing shadows use multiple layers, a consistent light direction, and a colour tinted towards the background rather than pure black.
Craft convention. True because the industry converged on it. Breaking it costs familiarity, not correctness.
On this plate
Reach for this when
- Defining elevation tokens.
- Reviewing visual craft on cards and overlays.
Common mistakes
- Pure black shadows.
- Inconsistent light direction.
- Large shadows on scrolling or animating elements.
- Using pure black at high opacity, which produces a grey halo rather than a shadow.
Layered shadows
:root {
/* Tinted towards the surface hue, never pure black */
--shadow-1:
0 1px 2px oklch(0.2 0.02 90 / 0.06),
0 1px 1px oklch(0.2 0.02 90 / 0.04);
--shadow-2:
0 2px 4px oklch(0.2 0.02 90 / 0.06),
0 4px 8px oklch(0.2 0.02 90 / 0.05);
--shadow-4:
0 8px 16px oklch(0.2 0.02 90 / 0.08),
0 16px 32px oklch(0.2 0.02 90 / 0.08),
0 1px 0 oklch(1 0 0 / 0.6) inset; /* top highlight */
}Two or three layers with increasing blur and decreasing opacity read as light falling off, which a single shadow cannot do.
Rules
- One light source for the whole product, conventionally from above. Shadows offset downward.
- Larger elevation means larger blur and larger offset, not just darker.
- Tint the shadow towards the background hue. Pure black shadows look muddy on any coloured surface.
- Shadow is a decoration, not information. Never use it as the only cue for something functional such as focus.
- In dark mode, shadows are largely invisible. Use surface lightness for elevation instead.
Making shadows look like light
Do
- Layer two or three shadows: a tight one for contact, a wider one for ambient spread.
- Tint the shadow with the surface hue rather than using pure black.
- Increase blur and offset together as elevation rises.
- Keep shadows subtle enough that the surface stays the subject.
Do not
- Use one large soft black shadow for everything.
- Animate box-shadow on hover for many elements at once, which is expensive to paint.
- Rely on shadow alone to separate a surface in dark mode.
In practice
- i.
Single flat shadow versus layered
Visual craftOne shadow at 20 percent opacity reads as a grey rectangle behind the element. Three layers at 4 to 8 percent read as light. The total darkness is similar; the perceived quality is not.
- ii.
One shadow against three
Why layering reads as realA single 0 4px 12px shadow reads as a sticker. The same card with a one-pixel contact shadow, a mid spread and a wide ambient layer reads as an object on a surface, at the cost of two extra values.
Local chart
FND·049 · Region II · Grid C2
This entry and the entries it is stated to connect with. Each line is labelled with what the connection means.
Continue from here
Each link says what the connection is, so you can tell a principle from an alternative from a thing people mix this up with.
Related concept
Connected closely enough to change how you apply this.
- Dark ModeFND·027 · UI foundation
- ElevationFND·048 · UI foundation
- Figure and GroundFND·009 · UI foundation
- MotionFND·052 · UI foundation
- NeutralsFND·025 · UI foundation
- Performance as User ExperienceFND·054 · UI foundation