The Alert Dialog component displays critical information that requires user acknowledgment or action.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/yogendrarana/craftdotui/llms.txt
Use this file to discover all available pages before exploring further.
Installation
Usage
Components
AlertDialog (Root)
Controlled open state.
Default open state.
Callback when state changes.
AlertDialogTrigger
Opens the alert dialog when clicked.AlertDialogPopup
The alert dialog content container. Automatically includes backdrop and viewport.AlertDialogHeader
Helper component for header layout with title and description.AlertDialogFooter
Helper component for footer layout with action buttons.AlertDialogTitle
Required for accessibility - provides the alert’s title.AlertDialogDescription
Provides additional context about the alert.AlertDialogClose
Closes the alert dialog when clicked.Examples
Destructive Action
Accessibility
- Built on @base-ui/react AlertDialog primitive
- Focus trap keeps focus within alert
- Cannot be dismissed by clicking backdrop
- Escape key closes the alert
- Requires AlertDialogTitle for accessible name
- Returns focus to trigger on close