The library is still in early development. Breaking changes and bugs may occur without prior notice. Thanks for your interest in using the library!

Search

Alert Dialog

Source

A modal dialog component for displaying critical information or actions.

Usage

Import the AlertDialog components from @bun-ui/react and use them in your project:

import {
  AlertDialog,
  AlertDialogTrigger,
  AlertDialogContent,
  AlertDialogTitle,
  AlertDialogAction,
  AlertDialogCancel,
} from "@bun-ui/react"
<AlertDialog>
  <AlertDialogTrigger className="btn">Open Alert Dialog</AlertDialogTrigger>
  <AlertDialogContent>
    <AlertDialogTitle>Are you sure?</AlertDialogTitle>
    <p>This action cannot be undone. Do you want to proceed?</p>
    <div className="flex justify-end gap-2">
      <AlertDialogCancel className="btn-outline">Cancel</AlertDialogCancel>
      <AlertDialogAction className="btn">Confirm</AlertDialogAction>
    </div>
  </AlertDialogContent>
</AlertDialog>