# Confirm dialog (ConfirmDialog) · Booki

> A question a person answers before something happens: post, pay, release. An agent can read it and cancel, never agree; a typed word and async work are built in.

Source: https://booki.dev/docs/confirm-dialog

Building blocks

# Confirm dialog

`ConfirmDialog`

A question a person answers before something happens: post, pay, release. An agent can read it and cancel, never agree; a typed word and async work are built in.

The person sees

Bridge demo

```
booki_version=$(npm view @booki-aui/react@latest version) &&
ui_sdk_version=$(npm view "@booki-aui/react@$booki_version" peerDependencies.@ui-sdk/core) &&
pnpm add --save-exact "@booki-aui/core@$booki_version" "@booki-aui/react@$booki_version" "@booki-aui/styles@$booki_version" \
  "@ui-sdk/core@$ui_sdk_version" "@ui-sdk/react@$ui_sdk_version"
```

## Try the bridge

Open this page in a browser and run the example in the console with a fresh preview. Read the current ref from the snapshot before acting.

```javascript
const { agent } = window
const entry = agent.snapshot().filter(
  (entry) => !entry.offPage && entry.component === "alert-dialog",
)[0]
const result = await agent.act({
  steps: [{
    ref: entry.ref,
    action: "setOpen",
    args: [true],
  }],
})
console.log(result.ok) // true
```

Opened the question.

Import from `@booki-aui/react`. For Booki's default styling, add `import "@booki-aui/styles"`.
