RizzyUI

Alert Dialog

RzAlertDialog provides a blocking confirmation modal for destructive or high-priority actions. It uses the shared modal primitive and Alpine.js behavior from rzModal. By default it disables Escape-key and outside-click dismissal.

Basic Alert

Triggers

Use AlertDialogTrigger with AsChild to wrap any trigger element.

Source
<RzAlertDialog>
    <AlertDialogTrigger AsChild>
        <RzButton Variant="ThemeVariant.Warning">Open Alert</RzButton>
    </AlertDialogTrigger>
    <AlertDialogContent>
        <AlertDialogHeader>
            <AlertDialogTitle>Confirm action</AlertDialogTitle>
            <AlertDialogDescription>Please review before continuing.</AlertDialogDescription>
        </AlertDialogHeader>
        <AlertDialogFooter>
            <AlertDialogCancel>Cancel</AlertDialogCancel>
            <AlertDialogAction>Continue</AlertDialogAction>
        </AlertDialogFooter>
    </AlertDialogContent>
</RzAlertDialog>

Parameters

ComponentParameterDescriptionDefault
RzAlertDialogCloseOnEscapeAllows closing with Escape.false
RzAlertDialogCloseOnClickOutsideAllows closing by clicking backdrop.false
AlertDialogContentSizeControls max width of content panel.ModalSize.Large