Skip to content
IndexRequest a UIAboutContact

Backdrop Scrim Levels

A dialog over a busy page with light, medium and heavy scrims and an optional blur, to see what helps focus.

Open alone ↗

AI prompt

PROMPT: PASTE INTO YOUR AI CODING TOOL
Clean UI mockup of a colourful dashboard page behind a white dialog box titled Delete project with two buttons, three small versions side by side showing the scrim at light, medium and heavy darkness, the dashboard visible but progressively dimmer, the third version with a soft blur of the page, labelled 20 percent, 45 percent and 70 percent, light theme, flat modern style. Negative: heavy shadows, clutter, text errors, device frames. Reduced motion: static design.

About this pattern

Definition

A scrim is the dark layer between a page and the dialog above it. Too light and the page competes with the dialog; too heavy and the page vanishes, hiding context. A medium scrim, often 40 to 60 percent black, with optional blur, separates layers while keeping the page recognisable.

Purpose & UX principles

  • Use a full-cover fixed element behind the dialog with a background of rgba black.
  • Light: about 20 percent, for low-stakes popovers; medium about 45 percent for dialogs; heavy about 70 percent for blocking tasks.
  • Backdrop blur softens busy pages but costs performance; use sparingly.
  • Clicking the scrim may close the dialog, except for destructive or form dialogs.

Interaction states

  • Level buttons, a Blur switch and an Open dialog button.

Motion specification

  • The scrim fades in over 200ms.
  • Reduced motion: no fade.

Responsive behaviour

  • Whatever the scrim level, the dialog text must have strong contrast on its own surface.
  • Trap focus inside the dialog and set the page behind to inert.

Code

HTML
<div class="bx"><div class="pre" id="pre" role="group" aria-label="Scrim"><button data-p="0" aria-pressed="true">Light</button><button data-p="1" aria-pressed="false">Medium</button><button data-p="2" aria-pressed="false">Heavy</button></div><div class="pg2" id="pg2"><div class="bgp"><i style="background:#ff8a65"></i><i style="background:#4db6ac"></i><i style="background:#7986cb"></i><i style="background:#ffd54f"></i></div><div class="sc" id="sc" hidden><div class="dl" role="dialog" aria-label="Delete project"><b>Delete project?</b><p>This cannot be undone.</p><div class="ac"><button class="mini" id="cn" type="button">Cancel</button><button class="mini dn" type="button">Delete</button></div></div></div></div><div class="two"><label class="sw"><input id="bl" type="checkbox"> Blur</label><button class="mini" id="op" type="button">Open dialog</button></div></div>

Related patterns

Modal Dialog

↗
Modal DialogOverlays & Dialogs

Bottom Sheet

↗
Bottom SheetGestures & Touch

Spotlight Zoom Focus

↗
Spotlight Zoom FocusExplainers & Series