Design system/Foundations
Layers and stacking order
Anything floating on the page has a fixed layer. The dialog is the highest interactive layer, and only the toast sits above it, because it reports what the dialog just did.
In codeapp/globals.csscomponents/floating.tsx (FLOAT_Z)
Order
Rules
- Don't make up a new number; pick the layer your case resembles.
- Menus and lists opened from inside a dialog move to body with Floating and sit above the dialog (1280); no scroll container can clip them.
- Dialogs used to sit below the dock and opened under the navigation on phones; that's why every dialog became 1200.
- Escape closes only the topmost layer.
Related pages