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
openRequiredbooleanControlled visibility.
onCloseRequired() => voidCalled when cancel/overlay dismiss fires.
titleRequiredstringDialog heading.
destructiveOptionalbooleanStyles confirm as destructive.
loadingOptionalbooleanSpinner on confirm; blocks overlay dismiss.
confirmLeftIconOptionalReactNodeIcon before confirm label (or icon-only confirm).
confirmRightIconOptionalReactNodeIcon after confirm label; also used for icon-only if no left icon.
cancelLeftIconOptionalReactNodeIcon before cancel label (or icon-only cancel).
confirmIconOnlyOptionalbooleanIcon-only confirm via IconButton; confirmLabel is aria-label.
cancelIconOnlyOptionalbooleanIcon-only cancel via IconButton; cancelLabel is aria-label.
footerOptionalReactNodeCustom footer (replaces default actions).
onConfirmOptional() => voidPrimary 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 | numberPassed to Dialog — backdrop blur preset or custom px.