Reactolith UI Getting Started Introduction Installation Usage Layout Aspect Ratio Card Resizable Scroll Area Separator Direction Provider Forms Button Button Group Calendar Checkbox Combobox Field Input Input Group Input OTP Label Native Select Radio Group Select Slider Switch Textarea Toggle Toggle Group Data Display Accordion Avatar Badge Carousel Chart Collapsible Item Kbd Table Feedback Alert Empty Progress Skeleton Sonner Spinner Overlay Alert Dialog Context Menu Dialog Dropdown Menu Hover Card Popover Sheet Tooltip Navigation Breadcrumb Command Menubar Navigation Menu Pagination Sidebar Tabs

Alert Dialog

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

Preview

Delete Account Are you absolutely sure? This action cannot be undone. This will permanently delete your account and remove your data from our servers. Cancel Delete

Usage

<ui-alert-dialog>
  <ui-alert-dialog-trigger>Delete Account</ui-alert-dialog-trigger>
  <ui-alert-dialog-content>
    <ui-alert-dialog-header>
      <ui-alert-dialog-title>Are you absolutely sure?</ui-alert-dialog-title>
      <ui-alert-dialog-description>
        This action cannot be undone. This will permanently delete your account and remove your data from our servers.
      </ui-alert-dialog-description>
    </ui-alert-dialog-header>
    <ui-alert-dialog-footer>
      <ui-alert-dialog-cancel>Cancel</ui-alert-dialog-cancel>
      <ui-alert-dialog-action variant="destructive">Delete</ui-alert-dialog-action>
    </ui-alert-dialog-footer>
  </ui-alert-dialog-content>
</ui-alert-dialog>

Sub-components

<ui-alert-dialog> <ui-alert-dialog-trigger> <ui-alert-dialog-portal> <ui-alert-dialog-overlay> <ui-alert-dialog-content> <ui-alert-dialog-header> <ui-alert-dialog-media> <ui-alert-dialog-title> <ui-alert-dialog-description> <ui-alert-dialog-footer> <ui-alert-dialog-action> <ui-alert-dialog-cancel>

Props

<ui-alert-dialog>

PropTypeDefaultDescription
openbooleanControlled open state.
defaultOpenbooleanfalseDefault open state.

<ui-alert-dialog-content>

PropTypeDefaultDescription
size"default" | "sm""default"The size of the dialog.

All components also accept standard HTML attributes (class, id, style, data-*, aria-*, etc.) which are passed through to the underlying element.