Shadow
Add or remove shadows to elements.
Syntax
Add a .shadow-* utility to a panel, or use .shadow for the regular elevation. Shadows use --shadow-sm, --shadow and --shadow-lg, so token overrides affect every matching utility.
<article class="card shadow-sm">Project summary</article>Class and token reference
| Class or pattern | Effect |
|---|---|
.shadow-sm, .shadow, .shadow-lg | Applies the small, regular or large shadow token. |
.shadow-md | Alias for the regular shadow. |
.shadow-0 | Removes the box shadow. |
.hover-shadow-sm, .hover-shadow, .hover-shadow-lg | Applies a shadow while the pointer hovers. |
.hover-shadow-md | Alias for the regular hover shadow. |
Compare elevation
Use shadow utilities to add different box shadow sizes to elements.
Small shadow
Regular shadow
Larger shadow
<div class="shadow-sm">Small shadow</div>
<div class="shadow">Regular shadow</div>
<div class="shadow-lg">Larger shadow</div>Responsive behavior
Shadow utilities have no breakpoint variants. Use responsive Grid, Sizing and Spacings classes for the surrounding layout. Keep borders and visible focus indicators so the surface and its actions remain clear when shadows are unavailable.
Recipes
Make a flat panel
Use .shadow-0 to remove a box shadow from an element.
No shadow
<div class="shadow-0">No shadow</div>Give a linked card hover feedback
Use a native link for navigation and keep its keyboard focus indicator. The hover shadow is supplementary visual feedback.
<a class="card hover-shadow p-3" href="/components/card">Read the Card reference</a>