Display urgent confirmation dialogs over your application, built on Base UI.
View as MarkdownInstallation
Component API
| Prop | Type | Default | Description |
|---|---|---|---|
trigger | ReactNode | - | |
triggerIcon | ReactNode | - | A glyph beside the trigger's label. |
| A glyph beside the trigger's label. | |||
triggerIconPosition | leading | trailing | leading | Which end of the trigger triggerIcon sits at. |
Which end of the trigger triggerIcon sits at. | |||
open | boolean | - | |
onOpenChange | (open: boolean) => void | - | Called whenever it opens or closes, controlled or not. |
| Called whenever it opens or closes, controlled or not. | |||
icon | ReactNode | - | |
title | string | - | The dialog's heading, wired up by Base UI's own AlertDialog.Title. |
| The dialog's heading, wired up by Base UI's own AlertDialog.Title. | |||
description | string | - | The body text, wired up by Base UI's own AlertDialog.Description. |
| The body text, wired up by Base UI's own AlertDialog.Description. | |||
cancelLabel | string | Cancel | The dismissing button's label. |
| The dismissing button's label. | |||
confirmLabel | string | - | The confirming button's label. |
| The confirming button's label. | |||
onConfirm | () => void | - | |
showClose | boolean | true | |
tone | danger | neutral | danger | Colors the badge and the confirm button together. |
| Colors the badge and the confirm button together. | |||
triggerTone | danger | neutral | danger | The trigger's own color, independent of the dialog's tone - a neutral button can still open a destructive dialog. |
The trigger's own color, independent of the dialog's tone - a neutral button can still open a destructive dialog. | |||
size | sm | md | lg | md | Padding and text size of the trigger and the popup's buttons, on the same scale as Button, so a dialog matches the buttons beside it. |
| Padding and text size of the trigger and the popup's buttons, on the same scale as Button, so a dialog matches the buttons beside it. | |||
shape | square | rounded | squircle | pill | rounded | |
animated | boolean | true | |
focus | boolean | string | true | |
container | HTMLElement | null | - | |