Skip to content

ConfirmDialog

stablev1.0.0

Lightweight single-step confirmation dialog for destructive or consequential actions. Fills the H5 (Error Prevention) gap between zero-confirmation and the heavy CeremonyGate pattern. Includes useConfirmDialog hook for imperative usage.

OverlaysInteractive/Storybook ↗
import { ConfirmDialog } from "@danagraph/design-system"

Props

openrequired
Type booleanDefault —

Whether the dialog is open.

titlerequired
Type stringDefault —

Dialog heading.

description
Type ReactNodeDefault —

Explanatory body in plain language.

confirmLabel
Type stringDefault "Confirm"

Confirm button label.

cancelLabel
Type stringDefault "Cancel"

Cancel button label.

variant
Type "destructive" | "agency" | "neutral"Default "neutral"

Visual and semantic variant.

onConfirmrequired
Type () => voidDefault —

Called when user confirms.

onCancelrequired
Type () => voidDefault —

Called when user cancels or presses Escape.

loading
Type booleanDefault false

Loading state on the confirm button.

semantictypesurfaceborder
Design Rationale

This component was designed to express:

Explore Related

Was this helpful?