Surfaces
Introduce layering of components with ease.
- Laying out a page, a card, a panel or a menu: pick the surface for its depth in the stack, then the radius and shadow that go with it.
- Hover, selected and pressed states come from the translucent fills, not from new colors.
The short version
If you read nothing else on this page, read these.
bg-hover and bg-selected.The stack
Seven surfaces, always nested in this order. Point at a layer in the key to lift it out.
In context
A slice of the dashboard in both themes. Turn on the labels to see which surface each part sits on.
Dashboard slice
The docs landing, as the product draws it. Nothing is wired up: the theme menu is pinned open, with the cursor on one item.
api.acme.dev is publishing
Rebuilding from the latest commit on main. The current version stays up until it's live.
Your Docs sites
api.acme.dev is publishing
Rebuilding from the latest commit on main. The current version stays up until it's live.
Your Docs sites
Shape and depth
One base radius, scaled. Shadows light and tight.
Radius
Controls use rounded-md, cards rounded-lg, dialogs rounded-xl.
Shadows
Cards get shadow-card, floating surfaces shadow-overlay. In dark mode the shadow stays black, and what floats adds a crisp light edge. The glows are for the agent only.
Hover, selected and pressed
Translucent fills over whatever surface the control sits on. Press and hold the button.