Skip to content

Elevation

Surfaces at rest are flat and parted by tone or a hairline. Only what floats above the page gets a shadow.

Silkware separates surfaces with a step of tone or a one pixel hairline, not with shadows. Nothing at rest has a shadow. A shadow means one thing: this layer floats above the page, like a menu, a select, a popover or a sheet.

At rest: flat
Cards, inputs and outline buttons have no shadow.

Open each one: floating panels carry the panel shadow.

Shadow tokens

Two shadows are variables, each with a light and a dark value, and the Tailwind scale reads them.

UtilityResolves toUsed by
shadow-2xs, shadow-xs, shadow-smnoneInputs, outline buttons, cards, selected tabs, switches, slider thumbs. They sit flat.
shadow-md, shadow-lg, shadow-xl, shadow-2xl--elevation-panelMenus, selects, popovers, hover cards, sheets, chart tooltips.
shadow-panel--elevation-panelThe panel shadow by its brand name.
shadow-bar--elevation-barA scrolled header.
VariableLightDark
--elevation-bar0 2px 4px #0000000a, 0 12px 32px #000000140 2px 4px #0003, 0 12px 32px #0006
--elevation-panel0 4px 12px #0000000d, 0 16px 48px #000000260 4px 12px #0003, 0 16px 48px #0006

Because upstream components use the Tailwind steps, the theme maps the small ones to nothing and the large ones to the panel shadow. A component picks its elevation without knowing what the theme decided.

Edges

With no shadow to part a card from the page, an edge does it.

  • A light card on a light ground, and a dark card on a dark ground, carry a one pixel hairline: --border. Upstream's card draws it as a ring-1 at ten percent of the text colour, which lands in the same place.
  • Nothing else gets a border. --input is the stronger line, for form fields and real tables only.
  • Where a tone step is enough, use it: bg-muted on a bg-background page needs no line.

Where the theme differs from the brand source

Dialogs have no shadow. Upstream puts no shadow class on the dialog, only a scrim behind it, so the brand's panel shadow does not reach it.

Rules

Purchasing
Four orders across three sites.
Do

Leave a card at rest and let its hairline part it from the page.

Purchasing
Four orders across three sites.
Don’t

Don’t put a shadow on something that does not float.

No gradients, no glass blur and no glows. The only exceptions in the brand are a neutral scrim that keeps white text legible on video, and the soft edge of the hero's accent sweep, neither of which are components here.

  • Radius for the corners of floating panels.
  • Colour for --border and --input.