Elevations
Elevations use shadows, drop shadows, and blur effects to create depth and hierarchy in the interface. Our elevation system provides consistent elevation levels across all components.
Elevation Visualizations
Visual comparison of all elevation types. Each square demonstrates how shadows and blur effects appear in practice on a gray background.
Box Shadows
Drop Shadows
Inner Shadows (Simulated)
Inner shadows create a recessed effect. These are simulated using CSS inset shadows for demonstration.
Blur Values
Blur values create depth through focus effects. Each square shows a white box with blur applied on a gray background.
Box Shadow Elevations
Box shadows create depth by casting shadows around elements. Complete elevation scale from design tokens.
Drop Shadow Elevations
Drop shadows are used for elements that appear to float above the surface, like tooltips, popovers, and dropdowns.
Blur Values
Blur values are used for backdrop filters, glassmorphism effects, and creating depth through focus.
Usage Examples
How to Use Elevation Tokens
React/JSX Example:
// Box Shadow<div style={{ boxShadow: '0px 2px 0.25rem -0.125rem oklch(0.00% 0.0000 0.00 / 0.1)', padding: '1rem', borderRadius: '0.5rem'}}> Elevated content</div> // Drop Shadow<div style={{ filter: 'drop-shadow(0px 3px 0.188rem 0rem oklch(0.00% 0.0000 0.00 / 0.12))', padding: '1rem'}}> Floating element</div> // Blur (Backdrop Filter)<div style={{ backdropFilter: 'blur(8px)', WebkitBackdropFilter: 'blur(8px)'}}> Glassmorphic content</div>CSS Example:
.elevated-card { /* Box Shadow */ box-shadow: 0px 2px 0.25rem -0.125rem oklch(0.00% 0.0000 0.00 / 0.1); /* boxShadow.md */} .floating-element { /* Drop Shadow */ filter: drop-shadow(0px 3px 0.188rem 0rem oklch(0.00% 0.0000 0.00 / 0.12)); /* dropShadow.md */} .glassmorphic { /* Blur */ backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); /* blur.md */}Tailwind CSS (with custom config):
// tailwind.config.jsmodule.exports = { theme: { extend: { boxShadow: { 'elevation-sm': '0px 2px 0.25rem 0rem oklch(0.00% 0.0000 0.00 / 0.05)', 'elevation-md': '0px 2px 0.25rem -0.125rem oklch(0.00% 0.0000 0.00 / 0.1)', // ... other elevations } } }} // Usage<div className="shadow-elevation-md p-4 rounded-lg"> Elevated content</div>Best Practices
- Hierarchy: Use lower elevations (xs, sm) for subtle depth and higher elevations (xl, 2xl) for prominent elements like modals and dropdowns.
- Consistency: Use the same elevation level for similar components to maintain visual consistency across the interface.
- Layering: Stack elevations logically - cards on backgrounds use sm or md, while floating elements like tooltips use lg or xl.
- Performance: Shadows can impact rendering performance. Use elevation tokens consistently and avoid creating custom shadow values.
- Accessibility: Ensure sufficient contrast between elevated elements and their backgrounds. Shadows help create visual separation.