---
url: /reference/api/logger/prompts.Variable.confirm.md
---
# Variable: confirm

```ts twoslash
// @include: imports
const confirm: (opts) => Promise<boolean | typeof CANCEL_SYMBOL>;
```

Defined in: node\_modules/.pnpm/@clack+prompts@1.9.0/node\_modules/@clack/prompts/dist/index.d.mts:337

The `confirm` prompt accepts a yes or no choice, returning a boolean value
corresponding to the user's selection.

## Parameters

`opts`

[`ConfirmOptions`](prompts.Interface.ConfirmOptions.md)

## Returns

`Promise`<`boolean` | *typeof* [`CANCEL_SYMBOL`](prompts.Variable.CANCEL_SYMBOL.md)>

## See

https://bomb.sh/docs/clack/packages/prompts/#confirmation

## Example

```ts twoslash
// @include: imports
import { confirm } from "@clack/prompts";

const shouldProceed = await confirm({
  message: "Do you want to continue?",
});
```
