Foundations · Surfaces

Modal dialog

A centred, focus-trapping dialog that demands the user's full attention before they continue — a confirmation or a short form. It rides the modal elevation on the surface-4 overlay floor, over a dimmed, blurred scrim. Structure is head (title + description) · scrollable body · right-aligned foot — the primary + ghost action pairing.

Centred dialog · shown over the live scrim

Send invite is pinned :hover to show the accent-hover state; hover either button (or tab in) for the live hover / focus ring. Esc or a backdrop press also dismisses.

elevation · tone
The panel is elevation="modal" on the overlay tone (surface-4, #272d3b) — the highest surface tier, floated above the page floor so it reads as the top layer.
scrim
The .overlay-backdropvar(--scrim) at 62% with a 2px blur + slight saturate. It dims the app behind and captures the outside click that dismisses the dialog.
radius · width
Corners are --radius-xl (12px); width is min(520px, 92vw) and the panel caps at ~88vh with the body scrolling — the head and foot stay pinned.
structure
head 24px gutters (title = 18px semibold, description muted) · body 0 24px, scrollable · foot 16 24 24, gap 12, right-aligned. Keep one title so aria-labelledby resolves.
actions
The right-aligned ghost cancel + primary confirm pairing (a destructive confirm swaps the primary for danger). The primary is the affirmative, always last.
behaviour
Focus is trapped inside the panel while open and scroll is locked; Esc, the close (✕) and a scrim press all resolve onOpenChange(false).