Drop Shadow
UI DesignWhat is a Drop Shadow
A drop shadow is a shadow placed behind an element so it looks raised above the surface. In UI design, drop shadows show depth and help users see which elements sit on top, such as cards, menus and dialogs.
How a Drop Shadow works
A shadow is set by a few values:
- Offset: How far the shadow moves on the X and Y axes
- Blur: How soft the edge is
- Spread: How much larger the shadow is than the element
- Color and opacity: Usually a dark, transparent color
Drop Shadows in CSS
box-shadow draws a shadow around the element's box and follows rounded corners. The drop-shadow() filter follows the actual shape of the content, such as a transparent icon.
When to use Drop Shadows
Use shadows to show elevation: floating buttons, menus, dialogs and dragged items. Keep them soft and consistent, with one light direction. Styles such as neumorphism and claymorphism are built almost entirely from shadows.
Frequently asked questions
What is the difference between box-shadow and drop-shadow in CSS?
box-shadow draws a shadow around the element's rectangular box, following its rounded corners. The drop-shadow() filter follows the actual shape of the content, such as the outline of a transparent icon.
What does a drop shadow tell users?
It shows that an element sits above the surface behind it. Larger, softer shadows suggest the element is higher, for example a dialog above a page.
Do drop shadows work in dark mode?
They are much harder to see on dark backgrounds. Dark themes usually show depth with lighter surface colors for higher elements instead.
Related terms
View all UI Design terms →Elevation
Elevation is the distance between two surfaces along the z-axis, the depth of the screen. Designers use it to show which elements sit…
Gradient
A gradient is a smooth transition between two or more colors . In UI design, gradients add depth, mood and brand character to backgrounds…
Neumorphism
Neumorphism, also called soft UI , is a visual style where elements seem to be pressed into or raised from the background. The name mixes…
Card
A card is a container that groups short, related information about one subject , such as a product, article or job. It roughly looks like…
Flat Design
Flat Design is a minimalist design approach that emphasizes simplicity by removing decorative elements like gradients, textures, and…
Visual Hierarchy
Visual hierarchy is the order in which the eye moves through the elements on a screen. Designers set it with contrast, size and grouping…
