Skip to content
Protocore Design Systemv1.6.9

/// Overlay

Modal

Alias of Dialog — a centered, focus-trapping overlay for confirmations, forms, and focused tasks.

import { Modal } from "@protocore/pds";
View as Markdown

An alias of Dialog

Modal is the Mantine-familiar name for this library's Dialog — the same component under a second name for discoverability. Modal.Root, Modal.Trigger, Modal.Content, Modal.Title, Modal.Description, Modal.Close, and Modal.Footer are Dialog's parts re-aliased 1:1. See the Dialog page for the full API and accessibility notes. For a destructive confirmation, reach for AlertDialog instead.

Basics

Compose it exactly like Dialog — a trigger opens a centered content panel with a title, description, and footer actions.

Accessibility

  • Identical to Dialog: focus is trapped while open, Escape closes, and the trigger is restored on close (Radix Dialog under the hood).

Related

  • DialogA modal panel over a dimmed backdrop for focused tasks — forms, confirmations, and detail views that demand attention.
  • AlertDialogA modal that interrupts to confirm a consequential or destructive action — no backdrop escape, an explicit choice required.
  • DrawerAlias of Sheet — a side-anchored overlay that slides in from an edge for inspectors, filters, and detail panes.