Design

Depth Hierarchy in UI Design

Layers, shadows, blur and scale: how interfaces show what is on top, and how glass fits into the stack.

By The Blur Screens studio5 min read
Depth Hierarchy in UI DesignDESIGNDepth Hierarchyin UI Design

A screen is flat. Yet you instantly know that a dialog is in front of the page, that a menu has dropped down over the toolbar, that a card can be picked up. Interfaces fake a third dimension to tell you what matters and what you can touch. That illusion is called depth, and arranging it deliberately is depth hierarchy.

Why depth matters

  • Focus. The nearest thing gets attention. A modal that floats above a dimmed page says “deal with me first”.
  • Relationships. Things on the same layer belong together.
  • Affordance. Raised elements look pressable; sunken ones look like fields to fill.
  • Orientation. When a sheet slides over content instead of replacing it, you know you can go back.

The cues designers use

CueHow it signals “closer”
ShadowLarger, softer shadow means higher above the surface
OverlapWhatever covers something else is in front
BlurSharp is near; blurred is far, like a camera’s focus
ScaleBigger feels nearer
Brightness and contrastBrighter, higher-contrast elements advance; dim ones recede
Colour and saturationVivid comes forward; muted falls back
MotionNear things move faster and further than far things (parallax)
ScrimA dark veil pushes everything beneath it back

Most interfaces combine three or four of these. Each reinforces the others.

A typical layer stack

  1. Background. Wallpaper, page colour.
  2. Content. Text, images, the thing you came for.
  3. Cards and surfaces. Grouped content, slightly raised.
  4. Sticky navigation. Headers, tab bars, floating buttons.
  5. Menus and popovers. Temporary, anchored to a control.
  6. Modals and sheets. Demand attention, block what is beneath.
  7. Toasts and alerts. Brief, top-most messages.

Higher layers get stronger depth cues. Design systems call this elevation and give each level a fixed shadow so the whole product is consistent.

Shadows: the oldest cue

Imagine a light above and slightly in front of the screen. An object close to the surface casts a small, tight shadow. One held higher casts a larger, softer, lighter one.

  • Low elevation: offset 1–2px, blur 2–4px.
  • Medium: offset 4–8px, blur 12–24px.
  • High: offset 12–24px, blur 32–64px, lower opacity.

Good shadows are often two layered together: a tight dark one for contact and a wide faint one for ambience. Keep the light direction the same everywhere.

Blur: depth of field

Photographers separate a subject from its background by keeping one sharp and the other soft. Interfaces borrow the trick. When a panel blurs what is behind it, your eye reads the panel as in focus and near, and the rest as distant.

Blur has an advantage over a plain dark scrim: you keep a sense of what is underneath. Colours and shapes survive, so the context is not lost. That is the core idea of frosted glass, explained in what glassmorphism actually is, and it is why operating systems use it for control panels and sheets; see frosted glass in iOS and macOS.

Where glass sits in the stack

  • Best for upper layers: navigation bars, sidebars, popovers, sheets, floating widgets. These sit above content, and blur makes that obvious.
  • Poor for the content layer: articles, tables and forms need a stable, opaque surface.
  • One glass layer deep. Glass over glass muddles the hierarchy. If a menu opens from a frosted bar, make the menu more opaque.

A simple rule: the more temporary and “above” something is, the more it can float; the more reading it holds, the more solid it should be.

Thickness as hierarchy

With glass, you can express level through how much shows through.

LevelTintBlurShadow
Raised card10–15%8–12pxSmall
Navigation bar15–25%12–16pxMedium
Popover or menu30–50%16–20pxLarge
Modal50–70%, plus a scrim20px+Largest

Try these combinations in the generator: raise tint, blur and shadow together and watch the panel rise.

Depth in flat and dark designs

Flat design did not remove depth; it made the cues subtler. A one-pixel border, a slight change in background tone or a gap can separate layers without a shadow.

Dark themes need a different approach, because shadows are hard to see on dark backgrounds. The convention is that higher surfaces are lighter: a raised card is a slightly lighter grey than the page. Borders and subtle highlights along the top edge help too.

Motion completes the illusion

  • A sheet sliding up from the bottom tells you it sits on top and can be swiped away.
  • A menu growing from its button shows where it came from.
  • A background that scales down slightly behind a modal feels pushed back.
  • Parallax, layers moving at different speeds, is a strong cue but easy to overdo.

Keep transitions short, around 200 to 300 milliseconds, and respect prefers-reduced-motion.

Common mistakes

  • Everything elevated. If every card has a big shadow, nothing stands out.
  • Inconsistent light. Shadows pointing in different directions feel wrong even if nobody can say why.
  • Depth that lies. A raised, shadowed element that is not clickable confuses people.
  • Harsh shadows. Pure black, tight shadows look dated and heavy.
  • Too many levels. Three or four distinct elevations are enough for most products.
  • Depth by colour alone. Subtle tints fail for people with low vision. Combine cues.

Other approaches

Neumorphism tries to build depth from a single surface, with elements pressed out of or into it. It is striking but struggles with contrast. We compare it with glass in neumorphism vs glassmorphism.

A quick audit for your own screens

  1. List the layers on a screen. Are there more than four?
  2. Squint. Is the most important thing visibly “on top”?
  3. Do interactive elements look raised and static ones flat?
  4. Do all shadows share a direction?
  5. Does anything float that should not?

The short version

Depth tells people what is in front, what belongs together and what can be touched. Build it from shadow, overlap, blur, scale and motion, applied consistently and more strongly on higher layers. Use glass for the things that float, and keep reading surfaces solid. Experiment with elevation in the generator.

FAQ

The illusion that interface elements sit at different distances from the viewer, used to show importance and relationships.

Sharp elements look near and blurred ones look far, like focus in a photograph.

Three or four clearly different levels are enough for most products.

Keep reading

Partner with us

Show your product to people who love pretty pixels

We take a few clearly labelled sponsored links, featured tool spots and newsletter mentions for design tools, UI kits, fonts, wallpapers and privacy gear. If it makes screens nicer, say hi.

One email a month. No spam, unsubscribe any time.