Pulse
Pulse

Components

Modal

Reuses the exact overlay/panel pattern already proven in the mobile navigation drawer — Escape to close, backdrop click to close, Tab trapped within the dialog — centered instead of slide-in, with the elevation-high shadow token.

Playground

Title

Size

Tab cycles within the dialog while it's open (focus never escapes to the page behind it), and returns to whatever triggered the modal once it closes.

Props

PropTypeDefaultDescription
openboolean—Controlled — the Modal renders nothing when false.
onClose() => void—Called on Escape, backdrop click, or the close button.
titlestring—Optional heading shown next to the close button.
size"sm" | "md" | "lg" | "fullscreen""md"Controls the dialog's max-width (384 / 448 / 672px); fullscreen fills the viewport.
childrenReactNode—Modal body content.

Usage Guidelines

When to use

  • Use for focused, blocking tasks that need a decision before returning to the page — confirmations, short forms.
  • Use size="lg" or "fullscreen" for content-heavy forms; keep the sm/md default for confirmations and short single-field edits.

When not to use

  • Don't use Modal for long-form content or multi-step flows that need their own URL/history state — Modal has no URL state, so back/forward and deep-linking don't work inside it.
  • Don't stack a Modal on top of another Modal.

Usage