Skip to content
Get started
Menu
Get started

Surfaces

Use shared surface and outline tokens to keep sections, controls and overlays consistent with the host theme.

The content is… Surface
Normal content Flat surface
Content that only needs separating Ruled outline
A selectable grouped box Bordered box
A status that needs attention Tinted tone
Disabled, loading or selected navigation Muted
An action menu on a tablet (window shorter side 600 dp or more, D92) Floating
A sheet, a dialog, or an action menu on a phone Overlay
Surface Recipe Where Don’t
Flat (default) On surface, no box PaymentSection (primitives.dart:647-650), rows, lists Box a section; it nests inside host cards
Ruled outline 1 px top or bottom PaymentAccordionItem, PaymentTabs, action bar, sheet footer Use border
Bordered box outline 1 px + borderRadius 8 Method list, PromoCard card layout (promo.dart:231-234) Use for non-selectable content
Tinted tone.container fill, no edge PaymentBanner, PaymentBadge Use for the normal path (decisions.md: “tinted boxes are for problems”)
Muted surfaceMuted fill Disabled fill, skeleton, selected nav item —
Ink textPrimary fill, surface text, elevation 0, control radius Toast and tooltip Add a shadow
Floating surface + outline edge + elevation 2 PaymentMenu on tablets only (interaction.dart:464); on phones, in either orientation, the menu is an overlay action sheet Add a shadow anywhere else
Overlay surface, elevation 0, top radius 12, scrim Bottom sheet (sheets.dart:163), side sheet with Colors.black54 barrier (:192), dialog Tint the surface (surfaceTintColor is transparent everywhere)

Do: a flat PaymentSection as in checkout. Don’t: wrap every section in a Material Card. Nested boxes compete with the primary action and make host composition harder.

Stripe Box backgroundColor maps to supported semantic surfaces or tone fills. Keylines use the theme’s outline, border or danger foreground. PaymentBox exposes token-based backgrounds and PaymentKeyline options; it has no boxShadow prop. See Box for the available options.

Checkout with flat sections and ruled action area.
Checkout, light, English
Phone action menu with grouped rows, a destructive action and Cancel.
A phone's action menu is an overlay sheet (D55)

PaymentBox uses semantic surface and muted backgrounds, token radii and neutral or critical keylines.