# ConfirmOptions (@salmonui/overlays/dialog)

> The ConfirmOptions interface of @salmonui/overlays/dialog: Options of useConfirm() / useAlert().

Canonical: https://salmonui.dev/docs/reference/overlays/dialog/ConfirmOptions

```ts
import type { ConfirmOptions } from '@salmonui/overlays/dialog';
```

Entry index: https://salmonui.dev/docs/reference/overlays/dialog (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/overlays/dialog.md).

## Reference

Kind: interface

```ts
interface ConfirmOptions extends Pick<AlertDialogProps, 'title' | 'description' | 'confirmLabel' | 'cancelLabel' | 'tone' | 'confirmIcon' | 'cancelIcon' | 'localeText' | 'className' | 'style'> {
    readonly signal?: AbortSignal | undefined;
    readonly onConfirm?: (() => unknown) | undefined;
}
```

Options of `useConfirm()` / `useAlert()`.

Members (10):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `signal` | `readonly signal?: AbortSignal \| undefined;` | optional | Aborting closes the dialog; the promise resolves `false` (confirm) or `undefined` (alert). |
| `onConfirm` | `readonly onConfirm?: (() => unknown) \| undefined;` | optional | Runs on confirm before the dialog closes. A returned promise keeps it open with a loading confirm button until it settles: fulfilled, the call resolves `true`; rejected, the error shows in the dialog (as on `AlertDialog`) and Cancel still resolves `false`. |
| `title` | `title: ReactNode;` | inherited |  |
| `description` | `description?: ReactNode;` | optional, inherited |  |
| `confirmLabel` | `confirmLabel?: ReactNode;` | optional, inherited |  |
| `cancelLabel` | `cancelLabel?: ReactNode;` | optional, inherited | Without a cancel label (and without `localeText.cancel` plus `onCancel`) the dialog is an alert with one action. |
| `confirmIcon` | `confirmIcon?: ReactNode;` | optional, inherited |  |
| `cancelIcon` | `cancelIcon?: ReactNode;` | optional, inherited |  |
| `tone` | `tone?: "danger" \| "primary";` | optional, inherited | `'danger'` styles the confirm button for destructive actions. |
| `localeText` | `localeText?: AlertDialogLocaleText;` | optional, inherited |  |
