Skip to content

Surfaces

Eight surface levels that nest. Components read their substrate from context and lift relative to it, so popovers, dropdowns, and dialogs stay visible at any depth — in both light and dark mode.

The problem

In light mode, we use shadow behind white surfaces to signify elevation. In dark mode, we use progressively lighter backgrounds instead.

But traditional components have a fixed background — a dropdown often ends up the same color as the dialog it sits in. That makes your interface look like this:

MInvite to your workspace
Select role
  • Workspace ownerCan change workspace settings and invite new members
  • MemberCan’t change workspace settings or invite new members
  • Restricted memberCan only see and edit content they created

The solution

Three pieces: tokens, substrate context, and the primitive.

Tokens

Eight background and shadow pairs. Light mode flattens to white after step 2. Dark mode adds white opacity and layers the shadows.

Dark

1
2
3
4
5
6
7
8

Light

1
2
3
4
5
6
7
8

Substrate

Each container passes its own level to the controls it contains. The same role picker opens at a different level on the page, in a popover, and in a dialog.

Page · surface-1
Popover · surface-3
Dialog · surface-5

Elevated

Wrap a panel to raise it above its parent. Background and shadow can be set independently.

Page
Card
Popover
Menu

Move through levels

Drag both knobs to choose which slice of the ladder to nest. Each layer lifts a single step off the one it sits in.

surface-1
surface-2
surface-3
surface-4

Examples

Invite dialog

The dialog uses surface 5. Its role picker opens at surface 7.

MInvite to your workspace
Select role

Color picker

The format dropdown sits above the picker panel.

Arrow keys adjust saturation and brightness. Shift uses larger steps.

#
Effect UI port notes

The native previews use explicit presentation props for nesting. The invite demo keeps its email and role selections local.