Binhlaig UI Component
Alert Dialog
Alert Dialog interrupts the user with an important confirmation before a destructive or irreversible action.
Installation
Install Alert Dialog in your project.
Terminal
npx binhlaig-ui@latest add alert-dialogFor project setup, installer selection, dependencies, and advanced installation instructions, see the Installation Guide.
View Installation Guide →Update or Overwrite →Import
Import the Alert Dialog primitives from your UI components directory.
Terminal
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog";Usage
Use Alert Dialog for actions that require explicit confirmation.
Destructive Action
Use a danger action when deleting data or an account.
Sign Out Confirmation
Confirm before ending the current user session.
Warning Dialog
Use warning styling for risky but reversible actions.
Controlled State
Control the dialog state from your own React state.
API Reference
Components available in the Binhlaig UI Alert Dialog.
| Component | Purpose | Description |
|---|---|---|
AlertDialog | Root | Controls open state and coordinates all dialog parts. |
AlertDialogTrigger | Trigger | Opens the alert dialog. |
AlertDialogContent | Content | Renders the modal overlay and dialog panel. |
AlertDialogHeader | Layout | Groups the title and description. |
AlertDialogTitle | Heading | Provides the accessible dialog title. |
AlertDialogDescription | Description | Explains the action and its consequences. |
AlertDialogFooter | Layout | Groups confirmation and cancellation actions. |
AlertDialogCancel | Cancel | Closes the dialog without confirming. |
AlertDialogAction | Confirm | Confirms the requested action. |