> ## Documentation Index
> Fetch the complete documentation index at: https://docs.awaitio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Confirm

> Asks before something irreversible.

`io.confirm()` asks a yes or no question with a Confirm and a Cancel button and returns `true` or `false`. Either button answers at once, so the step has no Continue button. Provided by the `@awaitio/confirm` package.

<Frame>
  <img src="https://mintcdn.com/awaitio/MjbT5AW66vMXbVck/images/io-confirm.png?fit=max&auto=format&n=MjbT5AW66vMXbVck&q=85&s=3dacdc67d98e86f9ed2d8435ebe6b681" alt="The question Clear the whole cache? with help text under it and Confirm and Cancel buttons" width="1404" height="252" data-path="images/io-confirm.png" />
</Frame>

## Install

```bash theme={null}
npm install @awaitio/confirm
```

## Setup

Register it under the key you want in `io`, see [Input components](/core/components):

```ts app.ts {5} theme={null}
import { confirm } from '@awaitio/confirm';

export const app = new AwaitIO({
  // name, actionsDirectory, theme, secret, users…
  components: { confirm },
});
```

## Usage

```ts theme={null}
const isConfirmed = await io.confirm('Delete this user account?', {
  helpText: 'All of their data will be deleted immediately.',
});

if (!isConfirmed) {
  return 'Nothing was deleted.';
}
```

Ask it on its own, not in `io.group`: its buttons send the whole step.

## Props

| Prop | Type | Required | Description |
| - | - | - | - |
| `helpText` | `string` | Optional | Secondary text under the question. |

## Returns

`boolean`: `true` for Confirm, `false` for Cancel.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.