← All Foundations

Canon

Elevation

Depth creates hierarchy. Three shadow levels establish visual relationships between elements.

Published January 8, 2026

Shadow Scale

Three levels of elevation for clear visual hierarchy.

TokenUse
--shadow-performance-scale-smButtons, inputs, subtle lift
--shadow-performance-scale-mdCards, dropdowns
--shadow-performance-scale-lgModals, popovers

Shadow Values

--shadow-performance-scale-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
--shadow-performance-scale-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
             0 2px 4px -1px rgba(0, 0, 0, 0.06);
--shadow-performance-scale-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
             0 4px 6px -2px rgba(0, 0, 0, 0.05);

Usage Patterns

Cards

.card {
  box-shadow: var(--shadow-performance-scale-md);
}

.card:hover {
  box-shadow: var(--shadow-performance-scale-lg);
  transform: translateY(-2px);
}

Modals

.modal {
  box-shadow: var(--shadow-performance-scale-lg);
}

Buttons

.button {
  box-shadow: var(--shadow-performance-scale-sm);
}

.button:active {
  box-shadow: none;
}

Z-Index Scale

Consistent stacking order for overlapping elements.

TokenValueUse
--z-performance-dropdown100Dropdowns, tooltips
--z-performance-modal200Modal dialogs
--z-toast300Toast notifications
--z-performance-tooltip400Tooltips on top

Best Practices

  1. Use sparingly - Not every element needs elevation
  2. Maintain hierarchy - Higher z-index = more shadow
  3. Animate transitions - Smooth shadow changes on hover
  4. Dark mode - Shadows less visible; use borders instead
/* Elevation transition */
.card {
  transition: box-shadow var(--duration-performance-fast) var(--ease-performance-standard),
              transform var(--duration-performance-fast) var(--ease-performance-standard);
}