Confirm

A confirmation dialog for destructive actions.

Installation

pnpm dlx shadcn@latest add @chelone/confirm

A confirmation dialog for destructive actions.

Props

PropTypeDefaultDescription
cancelstring—
CancelIconComponentType<{ className?: string }>—
classNamestring—
confirmstring—
confirmColor"primary" | "warning"—
ConfirmIconComponentType<{ className?: string }>—
contentReactNode—
contentTranslateOptionsobject—
defaultOpenboolean—Forwarded to Radix `Dialog.Root` — uncontrolled initial open state.
isOpenboolean—
loadingboolean—
modalboolean—Forwarded to Radix `Dialog.Root` — sets modality.
onClose(event: MouseEvent<Element, MouseEvent>) => void—
onConfirmMouseEventHandler—
titleReactNode—
titleTranslateOptionsobject—
translateOptionsobject—