Shadows
var-ui ships a single layered box-shadow scale (xs to xl). Each token stacks
multiple shadows with a consistent top-left light source (vertical offset is 2× horizontal).
Shadows tint from primary text color via color-mix, so they stay legible in both light and
dark mode without separate dark overrides.
Box shadows
Compound box-shadow tokens from shadow.xs through
shadow.xl. Each level layers multiple shadows with a consistent top-left light
source. Tint is derived from primary text color, so shadows follow light and dark mode
automatically.
Using shadows
Import token refs from core:
import { designTokens } from '@var-ui/core';
designTokens.shadow.md.var; // var(--var-ui-shadow-md)
designTokens.shadow.xs.var; // var(--var-ui-shadow-xs)Use them directly as box-shadow values in recipes or plain CSS:
.card {
box-shadow: var(--var-ui-shadow-md);
}
.floating-panel {
box-shadow: var(--var-ui-shadow-lg);
}Override shadows in a theme via createDesignTheme({ tokens: { shadow: … } }). Neo-brutalist
presets (Rose, Amber) swap in hard offset shadows while keeping the same token names — see
Themes for examples.