Skip to content

Shadows

Three shadow primitives from globals.css — light/dark aware. Use for layered surfaces; no new shadows are introduced here.

Introduction#

Shadows create elevation. DavinciUI currently defines three primitives in globals.css. They adapt to light/dark via CSS variables.

Shadow System#

Shadows are defined as --shadow-* variables combining --surface-inset + layered drop shadows. Use via shadow-[var(--shadow-card)]. No new shadows are created in this phase.

Available Shadows#

Card

Card

--shadow-card

Default card elevation — Cards, tiles

Card Hover

Card Hover

--shadow-card-hover

Elevated on hover — Hover cards

Panel

Panel

--shadow-panel

Floating panel — Popovers, dropdowns

Elevation Examples#

Base — no shadow

Flat

Card

--shadow-card

Hover me

→ --shadow-card-hover

Panel

--shadow-panel — popover, dropdown

Light / Dark Behavior#

Shadows include --surface-inset and adapt via .dark overrides. Toggle theme to see live change — no duplication.

Light

Dark

Hover Interaction#

Hover transition — subtle, no extra animation.

Hover this card

shadow-card → shadow-card-hover on hover

class: hover:shadow-[var(--shadow-card-hover)]

Usage Guidelines#

  • Use shadow-[var(--shadow-card)] for cards/tiles.
  • Use shadow-[var(--shadow-panel)] for floating panels.
  • Hover elevation is automatic via hover:shadow-[var(--shadow-card-hover)] — keep transition subtle.
  • Dark mode is automatic — do not duplicate shadow definitions.