Overlays
Destructive confirm dialog
Destructive confirm dialog: A confirmation dialog for destructive actions that only closes through its own buttons, refusing to dismiss on a backdrop click or Escape.
Using Destructive confirm dialog
Destructive confirm dialog uses the card preview frame with a light/dark theme setting.
Customize the preview
These controls are passed to the demo. Defaults and limits describe the preview; consult the implementation for its full prop API.
| Control | Type | Default | Preview limits |
|---|---|---|---|
title | text | Are you absolutely sure? | Up to 50 characters |
confirmLabel | text | Continue | Up to 20 characters |
dangerColor | color | #FF4D4D | No additional limit in the metadata. |
Which frameworks are available for Destructive confirm dialog?
Destructive confirm dialog is available for React, Vue, Svelte, Astro, HTML. The live preview uses React; the source observations below apply to index.tsx. Check the selected port before relying on the same interactions.
What does Destructive confirm dialog depend on?
The React metadata lists these npm dependencies beyond React: motion, radix-ui, clsx, tailwind-merge.
What accessibility details are visible in Destructive confirm dialog?
The React source for Destructive confirm dialog includes: native elements (button); attributes and handlers (aria-hidden, onKeyDown); explicit roles (alertdialog); key comparisons (Tab). These are source observations. Verify accessible names, focus order and keyboard behavior in the composed page.
How does Destructive confirm dialog handle reduced motion?
Destructive confirm dialog reads the motion preference in its React source through useReducedMotion(). Preference-dependent expressions in index.tsx: duration: reduced ? 0 : 0.16; duration: reduced ? 0 : 0.2; reduced ? { opacity: 0 } : { opacity: 0, scale: 0.92 }. Check the full implementation, shared styles and selected port with reduced motion enabled; these observations do not establish that every animation stops.