Elevation and materials
Elevation shows what sits above what: a menu above the page, a dialog above everything. Content stays flat, and height is kept for surfaces that float over it.
Levels
- Level 0The page, resting cards, wells, tables
--elevation-0No shadow - Level 1A clickable card under the pointer
--elevation-18 px down, 24 px blur - Level 2The navigation rail, the bottom bar on a phone
--elevation-212 px down, 32 px blur - Level 3Menus, popovers, dialogs, sheets, toasts
--elevation-324 px down, 64 px blur
Each surface sits at one level. Content stays at the bottom and stands out from the page by its fill. A shadow appears only when a surface floats over the content or lifts under the pointer.
Height in both themes
In the light theme the shadow carries the height. A card is already white, so a menu cannot get lighter, and its soft shadow lifts it off the page. Light shadows take the navy of the ink, since black turns a white page gray.
In the dark theme a shadow barely shows against a dark page, so a higher surface is also a lighter one. The page is the darkest fill, a card is lighter and a menu lighter again.
Welders for a shipyard in Split
Croatia, 24 positions
- Page
- #f5f5f7 in light, #000214 in dark
- --bg
- Card
- #ffffff in light, #191c2c in dark
- --surface-1
- Menu and dialog
- white at 97 percent in light, #20232f in dark
- --glass-fill-raised
Materials
Solid is the material of content. Pages, cards, fields and tables are opaque, and nothing shows through.
Frosted glass is for bars that float over scrolling content, such as the bottom bar on a phone. It blurs what passes underneath, so labels stay readable while the content stays in view.
Menus, popovers and dialogs use a raised fill that is nearly opaque, so their text reads as if on paper. On a phone they are fully opaque.
A scrim dims the page under a dialog or a sheet and tells people that the page is out of reach until they close it.
- Welders for a shipyard in Split
- Care workers for a clinic in Graz
- Drivers for a logistics firm in Plovdiv
- Cooks for a hotel in Dubrovnik
- Electricians for a site in Bratislava
- Warehouse staff for a depot in Brno
- Nurses for a hospital in Ljubljana
- Painters for a shipyard in Rijeka
- Masons for a builder in Sofia
- Farm workers for an orchard in Osijek
- Welders for a shipyard in Split
- Care workers for a clinic in Graz
- Drivers for a logistics firm in Plovdiv
- Cooks for a hotel in Dubrovnik
- Electricians for a site in Bratislava
- Warehouse staff for a depot in Brno
- Nurses for a hospital in Ljubljana
- Painters for a shipyard in Rijeka
- Masons for a builder in Sofia
- Farm workers for an orchard in Osijek
- Solid
- opaque
- --surface-1
- Frosted
- blur 48 px with strong saturation
- --glass-blur-nav
- Raised
- nearly opaque, blur 28 px
- --glass-fill-raised
- Scrim
- navy at 44 percent in light, 66 percent in dark
- --overlay
When glass is allowed
Use glass only on the outermost surface. A glass surface inside another can blur only its parent, not the page, so it turns into a flat gray patch.
Text on frosted glass carries a soft halo in the color of the surface, which keeps it readable over any content. Do not add contrast to the blur to help legibility, since it crushes the content beneath into gray.
When the browser cannot blur, or the reader asks for less transparency, glass falls back to its solid fill. In forced colors it takes the system background and a 1 px edge.
Stacking order
Layers stack in a fixed order, from sticky headers at the bottom to toasts at the top. Give a layer its token, not a number of your own.
A layer opened from inside another opens within it. A menu opened in a dialog renders in the dialog’s layer, so it shows above the dialog and closes first.
Escape closes the top layer only, and focus returns to the control that opened it.
- Sticky table and list headers
- 20
- --layer-sticky
- Page header, navigation rail
- 40
- --layer-header
- Menu, popover, tooltip
- 65
- --layer-popover
- Dialog, sheet, scrim
- 60
- --layer-dialog
- Toast
- 70
- --layer-toast
Permitted and not permitted
Permitted
A shadow on surfaces that float over content
Menus, dialogs and bars that stay in view as the page scrolls.
Frosted glass on a bar over scrolling content
The blur keeps its labels readable.
Layer values from the layer tokens
The stacking order stays the same across screens.
Not permitted
A shadow on a card at rest
A resting card is flat and separates by its fill.
Glass inside glass
The inner surface blurs only its parent and turns gray.
A black shadow
It turns a white page gray.
A z-index such as 1000 or 9999
Pick the layer the surface belongs to.