Shadows and Depth in Web Design

Web Design Principles2 min readBy the Monopage team

Shadows help visitors understand a page as a set of layers. A card that sits slightly above the background looks separate. A button that seems to lift when you hover invites a click. Used consistently, shadows add clarity. Used heavily, they add clutter.

What shadows communicate

  • Separation: this item is a distinct object, such as a card.
  • Hierarchy: the higher the item appears, the more important or temporary it is. A dropdown or dialog sits above the page.
  • Interactivity: a change in shadow on hover shows that something responds.

Create a depth scale

Pick a small number of shadow levels and reuse them. For example:

  1. Resting: a very soft, small shadow for cards.
  2. Raised: a larger shadow when hovering over a card or button.
  3. Floating: a wide shadow for menus and dropdowns.
  4. Overlay: the strongest, for dialogs, usually combined with a dimmed background.

Add these to your design system so every component uses them the same way.

Make shadows look natural

  • Use soft edges. A large blur with low opacity looks more realistic than a sharp, dark shadow.
  • Keep a consistent light direction. Shadows usually fall below and slightly to one side.
  • Use tinted shadows. A shadow with a hint of your brand color or a dark blue often looks softer than pure black.
  • Increase blur and offset together. Items that are higher cast longer, softer shadows.

Do not rely on shadow alone

Some visitors cannot see subtle shadows because of low vision, bright glare on a screen, or high contrast modes. If a shadow is the only thing separating a button from the page, consider adding a border or a clear color difference as well. See button design best practices.

Balance with flat areas

A page with shadows everywhere has no focal point. Use depth for the few things that matter most, such as primary cards and overlays, and let the rest sit flat. The idea ties in with visual hierarchy.

Performance tips

Large, blurry shadows on many elements can be costly to draw, especially on older phones and when they animate. For hover effects, prefer changing opacity or transform, and keep the number of animated shadows small. See animation performance.

Common mistakes

  • Heavy black shadows that look dated
  • Different shadow styles on every component
  • Shadows on text, which reduce legibility
  • Stacking shadow, border, and gradient on one element

Quick checklist

  • Do you have a defined depth scale?
  • Are shadows soft and consistent?
  • Does the design still work without them?

Shadows are one step toward dimensional design. Next, see 3D elements in web design for ways to add real depth.