---
title: Alert Dialog
description: A modal dialog that interrupts the user with important content and expects a response.
links:
doc: https://base-ui.com/react/components/alert-dialog#api-reference
---
## Preview
## Installation
CLIManual
```bash
npx @olyx/cli@latest add alert-dialog
```
Install the following dependencies:
```bash
npm install @base-ui/react
```
Copy and paste the following code into your project.Update the import paths to match your project setup.
## Usage
```tsx
import {
AlertDialog,
AlertDialogTrigger,
AlertDialogClose,
AlertDialogContent,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogDescription,
AlertDialogFooter,
} from "@/components/ui/alert-dialog"
```
```tsx
Delete Account
}
/>
Are you absolutely sure?
This action cannot be undone. This will permanently delete your account.
```
## API Reference
#### AlertDialog
Root component. Alias for `AlertDialog.Root` from Base UI.
See [Base UI docs](https://base-ui.com/react/components/alert-dialog#api-reference).
#### AlertDialogTrigger
Trigger button that opens the alert dialog. Alias for `AlertDialog.Trigger` from Base UI.
#### AlertDialogContent
Popup container that displays the alert dialog content.
| Prop | Type | Default |
| ----------------- | --------- | ------- |
| `showCloseButton` | `boolean` | `true` |
#### AlertDialogHeader
Container for the alert dialog title and description. Renders as a styled `div`.
#### AlertDialogFooter
Footer section for action buttons. Renders as a styled `div`.
| Prop | Type | Default |
| ----------------- | --------- | ------- |
| `showCloseButton` | `boolean` | `true` |
#### AlertDialogTitle
Title component. Alias for `AlertDialog.Title` from Base UI.
#### AlertDialogDescription
Description component. Alias for `AlertDialog.Description` from Base UI.
#### AlertDialogClose
Close button component. Alias for `AlertDialog.Close` from Base UI.
#### AlertDialogPortal
Portal component for rendering outside the DOM hierarchy. Alias for `AlertDialog.Portal` from Base UI.
#### AlertDialogOverlay
Backdrop/overlay component. Alias for `AlertDialog.Backdrop` from Base UI.
## Examples
### Custom Footer Buttons
### Without Close Button
### Sign Out Confirmation