Design Tokens Shadows

Shadows

Shadow tokens indicate elevation and, often, interactivity. Web Awesome provides three size-based shadow shorthands built from modular offset, blur, and spread tokens. Together with --wa-color-shadow, these tokens create realistic drop shadows.

Larger shadows have greater offset and blur values to suggest greater distance from the surface below. Any shadow can also be used as an inner shadow with the inset keyword, e.g. box-shadow: inset var(--wa-shadow-s).

Horizontal Offset (X)

Offset-x tokens control a shadow's horizontal position relative to the element. Use --wa-shadow-offset-x-scale to change all offset-x tokens at once.

Vertical Offset (Y)

Offset-y tokens control a shadow's vertical position relative to the element. Use --wa-shadow-offset-y-scale to change all offset-y tokens at once.

Blur

Blur tokens control how soft or sharp the shadow edge is. Use --wa-shadow-blur-scale to change all blur tokens at once.

Spread

Spread tokens expand or contract the shadow shape. A negative spread (the default) contracts the shadow inward for a more natural look. Use --wa-shadow-spread-scale to change all spread tokens at once.

    No results