Skip to content

Backdrop

Overview

Backdrop renders a full-screen overlay behind modal content. It is used internally by Dialog, Alertdialog, Drawer, Sheet, and CmdPalette to dim or blur the page background.

Usage

<div class="pm-backdrop pm-backdrop--default pm-backdrop--visible" aria-hidden="true"></div>

Guidelines

  • Always set aria-hidden="true" since the backdrop is decorative
  • Use the onClick handler to close the parent overlay
  • Choose the blur variant for a frosted glass effect
  • Use transparent when you need click-outside behavior without visual dimming

API

PropTypeDefaultDescription
variant"default" | "transparent" | "blur""default"Visual style of the backdrop
visiblebooleanfalseWhether the backdrop is visible
onClick() => void-Click handler for dismissing overlays