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.
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.
| Utility | Resolves to | Used by |
|---|---|---|
shadow-2xs, shadow-xs, shadow-sm | none | Inputs, outline buttons, cards, selected tabs, switches, slider thumbs. They sit flat. |
shadow-md, shadow-lg, shadow-xl, shadow-2xl | --elevation-panel | Menus, selects, popovers, hover cards, sheets, chart tooltips. |
shadow-panel | --elevation-panel | The panel shadow by its brand name. |
shadow-bar | --elevation-bar | A scrolled header. |
| Variable | Light | Dark |
|---|---|---|
--elevation-bar | 0 2px 4px #0000000a, 0 12px 32px #00000014 | 0 2px 4px #0003, 0 12px 32px #0006 |
--elevation-panel | 0 4px 12px #0000000d, 0 16px 48px #00000026 | 0 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 aring-1at ten percent of the text colour, which lands in the same place. - Nothing else gets a border.
--inputis the stronger line, for form fields and real tables only. - Where a tone step is enough, use it:
bg-mutedon abg-backgroundpage 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
Leave a card at rest and let its hairline part it from the page.
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.