Dialog

The one modal: a titled raised surface with a close button, over a blurred page.

Basic

Every modal in the app is a Dialog: its title is the heading and the accessible name, the close button sits top right, Escape and a click on the backdrop close it too. The page behind is dimmed and blurred (, ); with reduced transparency, or where blur is unsupported, the scrim thickens instead.

Description and footer

description sits under the title and describes the dialog; footer holds its actions, the primary one last. The body scrolls while the header and footer stay.

Required choices

dismissible={false} drops the close button and ignores Escape and the backdrop, so the footer is the only way out. Use it only while leaving would lose work or skip a required answer.

Sizes

sm, md and lg are widths (, , ); xl is the sheet, the window less on every side. stable holds the height () so tabs and steps do not reflow it. Without a size the dialog fits its content.

Focus

On open, focus goes to the dialog itself, never to its first control, so nothing that opens on focus (a tooltip, a Help mark) opens by itself and Tab starts at the top. A field the person will type into straight away opts in with autofocus. On close, focus returns to the control that opened it.

label names the dialog more fully than its heading, where the heading alone is terse ("Versions", of which dataset).

Modal

Modal is the layer under Dialog: the native element, the backdrop, the focus rule and the open and close motion, with no surface or header. The app uses it directly only for the search palette, whose field is its header; the dashboard's lint refuses other imports of it.

Examples

A basic dialog
A description and a footer
A required choice

No close button, Escape or backdrop: only the footer closes it.

Four sizes