ProductBrand
Join us
Foundations
  • Introduction
  • Colors
  • Typography
  • Icons
  • Illustrations
  • Logos
  • Shadows
Components
  • Accordion
  • Alert Dialog
  • Avatar
  • Badge
  • Button
  • Calendar
  • Card
  • Chart
  • Checkbox
  • Collapsible
  • Combobox
  • Context Menu
  • Date Picker
  • Dialog
  • Drawer
  • Dropdown Menu
  • Fluid Avatar
  • Hover Scroll Text
  • Input
  • Kbd
  • Popover
  • Progress Bar
  • Radio Group
  • Scroll Area
  • Select
  • Selectors
  • Separator
  • Separator Dot
  • Shimmer Text
  • Skeleton
  • Slider
  • Switch
  • Tabs
  • Textarea
  • Toast
  • Tooltip
Compositions
  • Empty State
  • File Attachment
  • Floating Bar
  • Input Banner
  • Markdown Editor
  • Media Controls
  • Product Feature Banner
  • Panels
  • Sidebar
  • Reasoning Trace
  • Pagination
  • Data Table
  • Breadcrumb
  • Thread Outline
Inline
  • Overview
  • Stat Tile
  • Metric Row
  • Comparison Table
  • Chart Card
  • Trend Tile
  • Cite
  • Custom
  • Agent skill

Alert Dialog

A modal dialog that interrupts the user with important content and expects a response. Unlike a regular dialog, an alert dialog requires explicit acknowledgement before it can be dismissed.

Examples

Overview

AlertDialog is a focused confirmation modal. It blocks backdrop dismissal and Escape, so the user must pick one of the actions. Use it for irreversible operations like deletes and account changes; for general modals use Dialog.

tsx
import {
  AlertDialog,
  AlertDialogTrigger,
  AlertDialogContent,
  AlertDialogHeader,
  AlertDialogTitle,
  AlertDialogDescription,
  AlertDialogFooter,
  AlertDialogCancel,
  AlertDialogAction,
} from "@rogo-technologies/ui/alert-dialog";

<AlertDialog>
  <AlertDialogTrigger>Delete project</AlertDialogTrigger>
  <AlertDialogContent>
    <AlertDialogHeader>
      <AlertDialogTitle>Are you sure?</AlertDialogTitle>
      <AlertDialogDescription>This action can't be undone.</AlertDialogDescription>
    </AlertDialogHeader>
    <AlertDialogFooter>
      <AlertDialogCancel>Cancel</AlertDialogCancel>
      <AlertDialogAction>Continue</AlertDialogAction>
    </AlertDialogFooter>
  </AlertDialogContent>
</AlertDialog>;

Usage

Destructive action

Pass variant="destructive" to AlertDialogAction for irreversible operations.

tsx
<AlertDialogAction variant="destructive" onClick={handleDelete}>
  Delete project
</AlertDialogAction>

Controlled

Control the dialog programmatically with open and onOpenChange.

tsx
const [open, setOpen] = useState(false);

<AlertDialog open={open} onOpenChange={setOpen}>
  <AlertDialogContent>
    <AlertDialogHeader>
      <AlertDialogTitle>Confirm</AlertDialogTitle>
      <AlertDialogDescription>Are you sure?</AlertDialogDescription>
    </AlertDialogHeader>
    <AlertDialogFooter>
      <AlertDialogCancel>Cancel</AlertDialogCancel>
      <AlertDialogAction onClick={handleConfirm}>Confirm</AlertDialogAction>
    </AlertDialogFooter>
  </AlertDialogContent>
</AlertDialog>;

Alert Dialog vs Dialog

FeatureDialogAlert Dialog
Backdrop clickCloses dialogRequires explicit action
Escape keyCloses dialogRequires explicit action
Use caseForms, settings, contentConfirmations, warnings, destructive actions

API

AlertDialog (Root)

PropTypeDefaultDescription
openboolean-Controlled open state.
defaultOpenbooleanfalseInitial open state (uncontrolled).
onOpenChange(open: boolean) => void-Callback when open state changes.

Subcomponents

ComponentPurpose
AlertDialogTriggerButton that opens the alert dialog.
AlertDialogContentThe popup container, including backdrop and portal.
AlertDialogHeaderTop section wrapper for title + description.
AlertDialogTitleRequired heading announced by screen readers.
AlertDialogDescriptionSupporting copy below the title.
AlertDialogFooterBottom action row.
AlertDialogCancelCancel button that closes without confirming.
AlertDialogActionConfirm button. Accepts variant="destructive" for danger flows.

Guidelines

Do

  • Use AlertDialog for irreversible operations (delete, archive, sign out)
  • Always provide an AlertDialogTitle and AlertDialogDescription
  • Label actions with the verb of the operation ("Delete project", not "OK")
  • Use variant="destructive" on the action when the operation can't be undone

Don't

  • Don't use AlertDialog for routine confirmations the user does dozens of times. It becomes noise
  • Don't pre-select the destructive action as the default focus
  • Don't write vague titles like "Confirm". Say what's about to happen
  • Don't use it for general forms or settings. Use Dialog instead
PreviousAccordion
NextAvatar
Made in NYC© 2026 Rogo Technologies Inc.

Design at Rogo

We’re redesigning an entire industry. Come design it with us.

See open roles

Design at Rogo

  • How we workThe mission of design at Rogo, and the open roles
  • About RogoThe company and the product