Skip to main content
Nexus Design System
GitHub

Layering

Six z-index tokens decide which overlay paints on top. Use one only when two positioned layers can overlap.

The z-index scale

From lowest to highest, nx:z-overlay to nx:z-max:

TokenValueUse
nx:z-overlay10Low-level scrims
nx:z-sticky30App-shell chrome, sticky headers
nx:z-modal50Dialog and its backdrop
nx:z-popover70Dropdown / select / tooltip — the floating layer
nx:z-toast100Notifications
nx:z-max9999Host system UI

Why popover sits above modal

Popover (70) sits above modal (50) on purpose. A dropdown, select or tooltip opened inside a Dialog has to paint above the Dialog. Keep popover above modal.

Shadow vs z-index

Shadow makes a surface look raised. z-index decides what paints on top. The two are separate, so a higher z-index doesn’t mean a bigger shadow.

Overlays render at the end of document.body, so one overlay already paints above the page. z-index matters when two overlays stack, like a select inside a dialog, or when your app has its own fixed element.