AtroUIAtroUI
  • Getting Started
  • Installation
  • MCP server
  • Coming from…
  • Collections
  • Registry
  • Theming
  • Host APIs
  • Brand kit
  • Identity kit
  • Landing kit
  • Launch workflow
  • For agents
  • Glossary
  • Compare
  • Alternatives hub
  • vs Aceternity UI
  • vs Magic UI
  • Aceternity alternative
  • Magic UI alternative
  • Tailwind Plus alternative
  • Changelog
  • Blog
  • Updates
  • ButtonCLI
  • DialogCLI
  • Alert DialogCLI
  • MenuCLI
  • Context MenuCLI
  • Navigation MenuCLI
  • MenubarCLI
  • PopoverCLI
  • TooltipCLI
  • Preview CardCLI
  • Scroll AreaCLI
  • SeparatorCLI
  • FieldCLI
  • Number FieldCLI
  • OTP FieldCLI
  • FormCLI
  • FieldsetCLI
  • InputCLI
  • TextareaCLI
  • CheckboxCLI
  • Checkbox GroupCLI
  • RadioCLI
  • SwitchCLI
  • ToggleCLI
  • Toggle GroupCLI
  • ToolbarCLI
  • AccordionCLI
  • CollapsibleCLI
  • ComboboxCLI
  • AutocompleteCLI
  • DrawerCLI
  • TabsCLI
  • ToastCLI
  • ProgressCLI
  • SliderCLI
  • MeterCLI
  • AvatarCLI
  • CardCLI
  • Form SelectCLI
  • Motion PlaygroundCLI
  • BreadcrumbsCLI
  • ProseCLI
  • Founder AvatarCLI
  • Theme ToggleCLI
  • Adaptive Theme SwitchCLI
  • Theme ProviderCLI
  • LogoCLI
  • TimelineCLI
  • Fade InCLI
  • StaggerCLI
  • Line RevealCLI
  • Word Reveal ScrollCLI
  • Text MorphCLI
  • Copy ButtonCLI
  • Label RollCLI
  • MagneticCLI
  • TiltCLI
  • SpotlightCLI
  • Animate NumberCLI
  • Transition PanelCLI
  • Scroll ProgressCLI
  • ASCII
  • DonutCLI
  • RainCLI
  • WaveCLI
  • SparkCLI
  • BarCLI
  • BootCLI
  • WordmarkCLI
  • DecodeCLI
  • Site HeaderCLI
  • Site FooterCLI
  • Bold FooterCLI
  • HeroCLI
  • PrincipleCLI
  • WorkCLI
  • CraftsCLI
  • LabCLI
  • WhoCLI
  • PricingCLI
  • Feature GridCLI
  • Logo CloudCLI
  • FAQCLI
  • Contextual CTACLI
  • Exit IntentCLI
  • Calendly EmbedCLI
  • Waitlist FormHost API
  • Newsletter FormHost API
  • JournalCLI
  • Social ShareCLI
  • ResourcesCLI
  • AR PortfolioCLI
  • Made With EmbedCLI
  • Hero ParallaxCLI
  • Hero LampCLI
  • Logo MarqueeCLI
  • Testimonials StackCLI
  • Feature BentoCLI
  • CTA BandCLI
  • Pricing TiersCLI
  • FAQ AccordionCLI
  • Stats BandCLI
  • Integration BeamCLI
  • Showcase CarouselCLI
  • Auth SplitCLI
  • SaaS StarterCLI
  • Landing KitCLI
  • OG ExamplesCLI
  • OG Live PreviewCLI
  • OG WorkspaceHost API
  • Thumbnail PreviewCLI
  • Thumbnail WorkspaceHost API
  • Project PlannerCLI
  • Scope ChatHost API
  • Launch WorkflowCLI
  • Live DashboardCLI
  • Analytics ProviderCLI
AtroUI·Home·Components·Blog·GitHub·Changelog

Primitive · CLI

Alert Dialog

Confirm destructive or irreversible actions with Base UI Alert Dialog.

Preview

$npx shadcn@latest add @atroui/alert-dialog

Try · Delete · confirm in place

Project still here

Installation

Agent blurb — install command + no npm UI rule. For agents

$npx shadcn@latest add @atroui/alert-dialog

Source lands in your repo. Installation · Registry

Usage

Use only when the next click removes data or cannot be undone. Lead with the consequence; keep Cancel easy to reach.
tsx
import { Button } from "@/components/ui/button"
import {
  AlertDialog,
  AlertDialogAction,
  AlertDialogCancel,
  AlertDialogContent,
  AlertDialogDescription,
  AlertDialogFooter,
  AlertDialogHeader,
  AlertDialogTitle,
  AlertDialogTrigger,
} from "@/components/ui/alert-dialog"

<AlertDialog>
  <AlertDialogTrigger render={<Button variant="destructive" />}>Delete</AlertDialogTrigger>
  <AlertDialogContent>
    <AlertDialogHeader>
      <AlertDialogTitle>Delete this project?</AlertDialogTitle>
      <AlertDialogDescription>Cannot be undone.</AlertDialogDescription>
    </AlertDialogHeader>
    <AlertDialogFooter>
      <AlertDialogCancel>Cancel</AlertDialogCancel>
      <AlertDialogAction variant="destructive">Delete</AlertDialogAction>
    </AlertDialogFooter>
  </AlertDialogContent>
</AlertDialog>
Related
  • Button
  • Dialog
  • Menu
  • Context Menu

Alert Dialog

PreviousDialogNextMenu
import { Button } from "@/components/ui/button"
import {
  AlertDialog,
  AlertDialogAction,
  AlertDialogCancel,
  AlertDialogContent,
  AlertDialogDescription,
  AlertDialogFooter,
  AlertDialogHeader,
  AlertDialogTitle,
  AlertDialogTrigger,
} from "@/components/ui/alert-dialog"

<AlertDialog>
  <AlertDialogTrigger render={<Button variant="destructive" />}>Delete</AlertDialogTrigger>
  <AlertDialogContent>
    <AlertDialogHeader>
      <AlertDialogTitle>Delete this project?</AlertDialogTitle>
      <AlertDialogDescription>Cannot be undone.</AlertDialogDescription>
    </AlertDialogHeader>
    <AlertDialogFooter>
      <AlertDialogCancel>Cancel</AlertDialogCancel>
      <AlertDialogAction variant="destructive">Delete</AlertDialogAction>
    </AlertDialogFooter>
  </AlertDialogContent>
</AlertDialog>