Skip to content
English
Don't know what it's called54 / 71

Scrim behind a dialog

What it's calledScrimbackdropoverlay maskGlossary

What goes wrong

A dialog dropped straight onto a busy page has nothing around it, so it blends into the cards behind and people cannot tell what is waiting for them.

The fix

Lay a dim, slightly blurred layer over the page while the dialog is open, so the dialog is the only sharp thing on screen.

Tell your AI

Behind every dialog put a full-screen scrim with background: var(--ds-scrim), which dims in both themes, and backdrop-filter: blur(6px), fading in over var(--ds-duration-base) (240ms), and give the dialog var(--ds-radius-2xl) (28px) corners and box-shadow: var(--ds-shadow-lg); or install the LayQ component modal (/registry/v1/controls-modal.json), which brings both.

  • --ds-scrim
  • --ds-duration-base240ms
  • --ds-radius-2xl28px
  • --ds-shadow-lg
Why AI-generated UIs all look the same: 12 rules that fix it

The dialog blends into the cards behind it