Backdrop

Backdrop renders a scrim over the viewport — full dim for loading or modal blocking, or a spotlight cutout that highlights one element by anchor_id. Bind config.open; pass on_click to dismiss on scrim tap. Prefer composed scrims inside Dialog and Drawer unless you need a standalone loading overlay or spotlight highlight. Pair spotlight cutouts with SpotlightTip and SpotlightTour.

  • Modal dialogs and drawers that need a dimmed page behind the surface
  • Loading states that block interaction until work completes
  • Any overlay that should signal a temporary state change
  • Bind config.open to show or hide the scrim.
  • Pass on_click when clicking the scrim should dismiss the overlay.
  • Put a Spinner or other content in children for loading overlays.
Dimmed scrim, click to close

Toggle the scrim open, then click the dimmed layer to dismiss — the default modal scrim pattern.

Loading overlay

Center a spinner on the scrim while async work runs.

Loading data…

Bounded demo frame

Scrim inside a positioned frame for catalog previews.

Content behind the scrim

Spotlight cutout

Dim the viewport except a padded hole around a target element by id.

Important control