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>import { Backdrop } from "@paramanu/overlays-react"
<Backdrop variant="default" visible onClick={handleClose} />Guidelines
- Always set
aria-hidden="true"since the backdrop is decorative - Use the
onClickhandler to close the parent overlay - Choose the
blurvariant for a frosted glass effect - Use
transparentwhen you need click-outside behavior without visual dimming
API
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "transparent" | "blur" | "default" | Visual style of the backdrop |
visible | boolean | false | Whether the backdrop is visible |
onClick | () => void | - | Click handler for dismissing overlays |