# Confirm dialog

Confirms an irreversible action. Focus starts on Cancel.

Import from `@a31labs/rax/confirm-dialog`.

## Usage

```tsx
<ConfirmDialog open={open} onOpenChange={setOpen} title="Delete service"
  description="The worker service will be removed. This cannot be undone."
  confirmLabel="Delete service" onConfirm={remove} />
```

## Rules

Props: `open`, `onOpenChange`, `title`, `description`, `confirmLabel`, `onConfirm` (may be async), `container`. Initial focus is on Cancel, the least destructive action. While `onConfirm` runs the danger button shows loading; a rejection keeps the dialog open and shows the error. Name the object, explain the consequence, label the danger button with the verb ("Delete service").

Page: https://rax.a31.at/components/confirm-dialog
