Skip to main content
⌘K

Search

Search pages, pieces and blocks.

Elevation

Flat by default. Paper for things that float, a scrim for things that stop the page, and glass for the one surface that should not hide what is under it.

Levels
Flat, Paper, Overlay
Shadow
--paper-shadow
Ink
antonio 990, 900

In a real piece

A card with its menu open and a tooltip. Hover a level.

Four surfaces, one shadow each at most. Nothing is pure black.

  • FlatCard: a 10% ring, and a shadow
  • PaperMenu: popover, its border, paper shadow
  • GlassTooltip: 55% fill, 6 blur, grain
  • ThumbSlider thumb: thumb shadow
Private lesson, Ericeira
Sat 5 December, 9:00

Deposit now, 60%

Edit booking
Duplicate
Cancel booking

Levels

Flat

Cards, stat cards, tables. Sits on the page, so it gets an edge and nothing else.

bg-card ring-1 ring-foreground/10

17 uses of the ring

Paper

Menus, selects, popovers, the combobox list. Floats over the page while you pick.

bg-popover border-popover-border shadow-paper

19 uses of shadow-paper

Overlay

Dialog, Alert Dialog, Sheet, Drawer. The page goes behind a scrim and focus is trapped.

bg-popover ring-1 over bg-scrim

6 uses of bg-scrim

Values

Shadows are drawn in antonio 990, never black (the Day paper shadow in 900). In Night they deepen and the surface itself gets a step lighter.

TokenDayNightUses
--paper-shadow0 1px 2px rgb(53 53 53 / 6%), 0 10px 28px -8px rgb(53 53 53 / 16%)0 1px 2px rgb(25 25 24 / 30%), 0 12px 32px -8px rgb(25 25 24 / 55%)19
--thumb-shadow0 0 0 .5px rgb(25 25 24 / 10%), 0 1px 2px rgb(25 25 24 / 12%), 0 3px 8px rgb(25 25 24 / 10%)the same at 40%, 40% and 35%8
--scrimrgb(25 25 24 / 10%)rgb(25 25 24 / 10%), unchanged6
--blur-glass6px6px4
--grainsvg fractal noise, 120 tile, 14%the same3

Glass

Glass, the Tooltip:bg-tooltip/55 bg-(image:--grain) backdrop-blur-(--blur-glass)Border at 80%. The beak is mixed solid so it reads as one piece.
Labels on an image, Image Compare:bg-background/80 backdrop-blur-(--blur-glass)The thumb takes the thumb shadow.

Do and don't

Edit
Duplicate
DoOne paper shadow on the one thing that floats. The card under it stays flat.
Private lesson, Ericeira
Sat 5 Dec, €90.00
Don'tA big black shadow on a card that does not move, with a filled box inside it. It floats over nothing.

In the code

  1. aStock shadows sit where paper is meant: Sheet and Toast use shadow-lg, the chart tooltip shadow-xl, Navigation Menu shadow-md, Sidebar and the Tabs indicator shadow-sm, Tooltip shadow-2xs.
  2. b--scrim is 10% in Night too. On #1f1f1e it barely dims the page, so a Night overlay reads by its surface alone.
  3. cDialog uses a ring and no shadow; Sheet uses a stock shadow. The two overlays look different for no reason.
  4. dThe thumb shadow is on Slider, Slide to Confirm and Image Compare thumbs. The Switch thumb, the other thumb, has none.

Rules

  1. 1Flat is the default. A surface earns a shadow only if it floats over other content.
  2. 2Use --paper-shadow for anything that floats. Never a stock shadow utility.
  3. 3An overlay dims the page with --scrim and traps focus. It does not add a second shadow.
  4. 4Glass is for small, short-lived surfaces, like a tooltip. Never a card or a panel.