Confirm Dialog
A destructive action confirmation dialog.
Installation
Full Setup guideInstall the component automatically via Shadcn CLI.
npx shadcn@latest add https://www.grettech.com/api/registry/confirm-dialogProps
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | Optional CSS classes to apply. |
title | string | "Are you absolutely sure?" | The dialog title |
description | string | "This action cannot be undone..." | The dialog description |
triggerText | string | "Open Dialog" | Text for the default trigger button |
confirmText | string | "Continue" | Text for the confirm button |
cancelText | string | "Cancel" | Text for the cancel button |
variant | 'default' | 'destructive' | 'default' | Variant for the confirm button |
onConfirm | () => void | - | Callback fired when user confirms |
children | ReactNode | - | Custom trigger element |
...props | React.HTMLAttributes<HTMLDivElement> | - | Accepts all standard HTML attributes (id, style, etc). |