Confirm Dialog

A destructive action confirmation dialog.

v0

Installation

Full Setup guide

Install the component automatically via Shadcn CLI.

npx shadcn@latest add https://www.grettech.com/api/registry/confirm-dialog

Other Examples

Default Variant

v0

Props

PropTypeDefaultDescription
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).