---
site: ui.zyx.tw
url: https://ui.zyx.tw/confirm-dialog
title: Confirm Dialog
description: "Asks before an action, locks both buttons while it runs and closes when it finishes."
---

# Confirm Dialog

Asks before an action, locks both buttons while it runs and closes when it finishes.

Group: Blocks.

## Install

```bash
bunx shadcn@latest init https://ui.zyx.tw/r/base.json
bunx shadcn@latest add @zyx1121/confirm-dialog
```

The first line sets a project up on the base; skip it if the project already has it.

## Item

### Confirm Dialog (`confirm-dialog`)

Asks before an action, locks both buttons while it runs and closes when it finishes.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/confirm-dialog.json`
- JSON: [confirm-dialog.json](https://ui.zyx.tw/r/confirm-dialog.json)
- Page: [https://ui.zyx.tw/confirm-dialog](https://ui.zyx.tw/confirm-dialog) ([Markdown](https://ui.zyx.tw/confirm-dialog.md))
- Registry dependencies: `https://ui.zyx.tw/r/alert-dialog.json`, `https://ui.zyx.tw/r/button.json`

## More

- [Index](https://ui.zyx.tw/index.md): every item
- [Agent instructions](https://ui.zyx.tw/agent-instructions.md): the call order and the rules
- [DESIGN.md](https://github.com/zyx1121/www.zyx.tw/blob/main/apps/ui/DESIGN.md): the design contract
