The Problem with Perfect Flatness
Modern UI design often celebrates flat minimalism. But pure flatness hides hierarchy. Every element feels equally important, leaving users unsure where to look or click. Let's fix that with one of the simplest, oldest tricks in visual design: depth.
Navigation Bar
Profile Card
Alex Chen
Product Designer
Step 1: Color Layers
Depth starts with contrast, not decoration. Build 3–4 shades of the same color. Use darker tones for background surfaces, lighter ones for interactive elements, and brightest tones for highlights.
Adjust Lightness
Slide to see how tone hierarchy builds spatial separation. Each +0.1 step feels one layer closer to you.
Step 2: Shadow
Shadows simulate light direction. Combine a soft bright rim on top (light source) and a subtle dark shadow below (depth anchor). Used together, they mimic how light falls on real surfaces.
Shadow Combinations
Click each option to see the effect. Notice how combining both creates the most realistic feel.
Step 3: Interactive Affordances
Depth doesn't just make things look better. It signals what's clickable. Hover states, active states, and elevation changes tell users "I'm interactive" without any instruction.
Button States
Hover and click these buttons to see how depth creates instant feedback.
Step 4: Theme Adaptation
The same depth system works in both light and dark modes. The principle stays consistent: darker backgrounds, lighter elevated surfaces. In dark mode, you simply start with a darker base and build up from there.
Depth in Both Themes
Toggle between themes to see how the layering principle adapts.
Step 5: Works Across All Colors
This isn't just for grays and neutrals. The layering principle works with any hue. Adjust the slider to see how depth works across the entire color spectrum.
Hue Explorer
Slide through different colors. The depth hierarchy remains clear regardless of hue.
Card Title
This is the main card surface
Step 6: Consistent Light Direction
Once you establish a light source (almost always from above), maintain it everywhere. Every shadow, every highlight, every gradient should reinforce the same lighting system.
UI Elements Gallery
All elements follow the same lighting rule: light from above, shadow below.
Bringing It All Together
Now let's see all these principles in action. This complete dashboard combines color layering, shadows, interactive affordances, theme adaptation, and consistent lighting into one cohesive interface. Same layout, radically different perception. Toggle between flat and depth designs, and switch between light and dark modes to see how it all works together.
Dashboard
Analytics
Overview
Quarter | Revenue | Growth |
---|---|---|
Q1 - Last | $3,680 | +$69 |
Q2 - Current | $4,680 | +$420 |
Predictions
Quarter | Revenue | Growth |
---|---|---|
Q3 - Next | $5,600 | +$389 |
Q4 - Upcoming | $2,600 | -$1,769 |