Aura Design System

Alert Dialog

A modal dialog that interrupts the user with important content and expects a response.

Preview

import {
  AlertDialog,
  AlertDialogAction,
  AlertDialogCancel,
  AlertDialogContent,
  AlertDialogDescription,
  AlertDialogFooter,
  AlertDialogHeader,
  AlertDialogTitle,
  AlertDialogTrigger,
} from "@/components/ui/AlertDialog";
import { Button } from "@/components/ui/Button";

export function AlertDialogDemo() {
  return (
  <AlertDialog>
    <AlertDialogTrigger asChild>
      <Button variant="outline">Show Dialog</Button>
    </AlertDialogTrigger>
    <AlertDialogContent>
      <AlertDialogHeader>
        <AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
        <AlertDialogDescription>
          This action cannot be undone. This will permanently delete your
          account and remove your data from our servers.
        </AlertDialogDescription>
      </AlertDialogHeader>
      <AlertDialogFooter>
        <AlertDialogCancel asChild>
          <Button variant="outline">Cancel</Button>
        </AlertDialogCancel>
        <AlertDialogAction asChild>
          <Button>Continue</Button>
        </AlertDialogAction>
      </AlertDialogFooter>
    </AlertDialogContent>
  </AlertDialog>
);
}

Installation

Make sure that namespace is set in your component.json file. Namespace docs: Learn more about namespaces

pnpm dlx shadcn@latest add @aura/alert-dialog

Props

AlertDialog

PropTypeDefault
All props fromAlertDialogRadix.Root-

AlertDialogPortal

PropTypeDefault
All props fromAlertDialogRadix.Portal-

AlertDialogOverlay

PropTypeDefault
All props fromAlertDialogRadix.Overlay-

AlertDialogTrigger

PropTypeDefault
All props fromAlertDialogRadix.Trigger-

AlertDialogContent

PropTypeDefault
All props fromAlertDialogRadix.Content-

AlertDialogHeader

PropTypeDefault
All props from"div"-

AlertDialogFooter

PropTypeDefault
All props from"div"-

AlertDialogTitle

PropTypeDefault
All props fromAlertDialogRadix.Title-

AlertDialogDescription

PropTypeDefault
All props fromAlertDialogRadix.Description-

AlertDialogAction

PropTypeDefault
All props fromAlertDialogRadix.Action-

AlertDialogCancel

PropTypeDefault
All props fromAlertDialogRadix.Cancel-