Layout & layering

Share content widths and a deliberate stacking order. Z-index values only compare within their stacking context, and do not override the browser’s top layer.

In use

.container {
  max-width: var(--content-max-width);
  margin-inline: auto;
}
.sticky-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}

These examples show how to consume the tokens. Assign values before using them.

--content-max-width

coreType: dimension

Max width for primary page content.

Use for: main layout container, nav header

Value: supplied by your design.

--overlay-max-width

coreType: dimension

Max width for overlays such as dialogs.

Use for: modals, dialogs

Value: supplied by your design.

--z-menu

coreType: number

Z-index for menus and dropdowns.

Starter value: 100

--z-sticky

coreType: number

Z-index for sticky headers or bars.

Starter value: 110

--z-fixed

coreType: number

Z-index for fixed-position chrome.

Starter value: 120

--z-drawer

coreType: number

Z-index for drawers and side panels.

Starter value: 130

--z-dialog

coreType: number

Z-index for modal dialogs.

Starter value: 140

--z-popover

coreType: number

Z-index for tooltips and popovers.

Starter value: 150

--z-tooltip

coreType: number

Z-index for tooltips.

Starter value: 160

--z-toast

coreType: number

Z-index for toasts and global notifications.

Starter value: 170

← All tokens