saturation/uisaturation/ui
DocsComponentsBlocksPages
GitHub

Sections

IntroductionComponentsInstallationMCPTheming

Components

ComponentsAccordionAI Chat InputAlertAnimated GroupAnimated NumberAvatarBadgeBeamBlur FadeBorder TrailBreadcrumbButtonButton GroupCalendar PickerCardChartCheckboxCollapsibleComboboxCommandComparison SliderContext MenuCredit CardData TableDate PickerDialogDropdown MenuEmoji PickerEmptyFieldFiltersFull CalendarGlow EffectInputInput GroupInput OTPItemKanbanKbdMenubarNavigation MenuNovel EditorPaginationParallaxProgressProgressive BlurRadio GroupRippleSelectSeparatorSheetSkeletonSliderSonnerSpinnerSpotlightSwitchTableTabsText EffectText ShimmerTextareaToggleToggle GroupTreeTypography
Docs/Components/Alert Dialog

Alert Dialog

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

Loading...

Installation

pnpm dlx shadcn@latest add https://ui.saturation.io/r/alert-dialog.json

Usage

import {
  AlertDialog,
  AlertDialogAction,
  AlertDialogCancel,
  AlertDialogContent,
  AlertDialogDescription,
  AlertDialogFooter,
  AlertDialogHeader,
  AlertDialogTitle,
  AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
<AlertDialog>
  <AlertDialogTrigger>Open</AlertDialogTrigger>
  <AlertDialogContent>
    <AlertDialogHeader>
      <AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
      <AlertDialogDescription>
        This action cannot be undone. This will permanently delete your account.
      </AlertDialogDescription>
    </AlertDialogHeader>
    <AlertDialogFooter>
      <AlertDialogCancel>Cancel</AlertDialogCancel>
      <AlertDialogAction>Continue</AlertDialogAction>
    </AlertDialogFooter>
  </AlertDialogContent>
</AlertDialog>

API Reference

AlertDialog

The root component that manages dialog state.

PropTypeDefaultDescription
openboolean—Controlled open state.
onOpenChange(open: boolean) => void—Callback when the open state changes.
defaultOpenbooleanfalseThe default open state for uncontrolled usage.

AlertDialogContent

The modal content container.

AlertDialogHeader

Container for the dialog title and description.

AlertDialogFooter

Container for the action buttons.

AlertDialogTitle

The title of the dialog.

AlertDialogDescription

The description text of the dialog.

AlertDialogAction

The primary action button (confirms the action).

AlertDialogCancel

The cancel button (dismisses the dialog).

PreviousAI Chat InputNextAlert

On This Page

  • Installation
  • Usage
  • API Reference
  • AlertDialog
  • AlertDialogContent
  • AlertDialogHeader
  • AlertDialogFooter
  • AlertDialogTitle
  • AlertDialogDescription
  • AlertDialogAction
  • AlertDialogCancel