Skip to main content

Alert Dialog

Confirm/cancel Dialog preset for destructive and irreversible actions.

Destructive

Primary confirm

Confirm with icons

Icon-only footer (both actions)

Icon-only confirm, text cancel

Icon-only cancel, text confirm

Custom footer (IconButton)

Loading

Frozen previews of loading on the confirm action. Overlay dismiss is disabled while loading.

Loading (try it)

Open the dialog and confirm — loading runs for ~800ms before the dialog closes.

Custom labels

Title only (no description)

Custom body

Icon-only trigger

Animation variants

animationVariant — click each control to compare press feedback.

enterAnimationVariant — open and close each panel to compare fluid spring motion (default, spring, zoom) vs legacy ease presets.

API

PropRequiredTypeDefaultDescription
openRequiredboolean—Controlled visibility.
onCloseRequired() => void—Called when cancel/overlay dismiss fires.
titleRequiredstring—Dialog heading.
destructiveOptionalboolean—Styles confirm as destructive.
loadingOptionalboolean—Spinner on confirm; blocks overlay dismiss.
confirmLeftIconOptionalReactNode—Icon before confirm label (or icon-only confirm).
confirmRightIconOptionalReactNode—Icon after confirm label; also used for icon-only if no left icon.
cancelLeftIconOptionalReactNode—Icon before cancel label (or icon-only cancel).
confirmIconOnlyOptionalboolean—Icon-only confirm via IconButton; confirmLabel is aria-label.
cancelIconOnlyOptionalboolean—Icon-only cancel via IconButton; cancelLabel is aria-label.
footerOptionalReactNode—Custom footer (replaces default actions).
onConfirmOptional() => void—Primary action handler.
animationVariantOptionalPressAnimationVariantdefaultPress animation — default, none, ripple, scale, sink, lift, pulse, or glow.
enterAnimationVariantOptionalEnterAnimationVariantdefaultPanel enter/exit — default and spring use fluid spring physics (Animate UI–style); zoom is a stronger pop; subtle keeps legacy ease motion; fade, slide-*, scale, or none.
overlayBlurOptionalDialogOverlayBlur | number—Passed to Dialog — backdrop blur preset or custom px.