Confirm Destructive

Destructive action confirm: a red trigger button opens a dialog with a title, warning text, Cancel and Confirm. Labels are configurable for deletes and resets.

src/registry/ui/confirm-destructive.tsx/r/confirm-destructive.json

Installation#

bash
npx shadcn@latest add @minidev/confirm-destructive

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/confirm-destructive.json

Usage#

tsx
import { ConfirmDestructive } from "@/components/ui/confirm-destructive"

export function Example() {
  return <ConfirmDestructive />
}

API reference#

ConfirmDestructive props
PropTypeDefault
triggerLabelstring"Delete"
titlestring"Are you sure?"
descriptionstring"This action cannot be undone."
onConfirm() => void-

Dependencies#

npm

React only

Built from

All dialog, drawer and popover components

Learn more