Skip to main content

Shadows

Open in ChatGPT

The shadow properties add shadow effects around an element's frame. Shadows signify items that are layered on top of each other in the user interface.

Shadows adapt automatically to both light and dark modes, appearing stronger in dark mode for better visibility.

Example

.element {
box-shadow: var(--dwc-shadow-xl);
}

Variables

VariableDescription
--dwc-shadow-xsExtra small shadow (1 layer)
--dwc-shadow-sSmall shadow (2 layers)
--dwc-shadow-mMedium shadow (3 layers, default)
--dwc-shadow-lLarge shadow (4 layers)
--dwc-shadow-xlExtra large shadow (5 layers)
--dwc-shadow-2xlDouble extra large shadow (6 layers)
--dwc-shadowvar(--dwc-shadow-m)