Skip to content
Components / Overlays

Alert dialog

A confirmation for a destructive or hard-to-undo action.

@fabrials/ui
Loading state

Installation

  1. Import the control from @fabrials/ui, after setting the app up.

    TypeScript
    import { AlertDialog, AlertDialogTrigger, AlertDialogContent, AlertDialogTitle, AlertDialogCancel, AlertDialogAction } from "@fabrials/ui";
  2. Or install it under shadcn's name, so code that imports @/components/ui/alert-dialog gets this control. See shims.

    npx shadcn@latest add @fabrials/alert-dialog

API reference

Prop / exportTypeDescription
openbooleanControlled open state.

Behavior

The confirm button names the consequence. Cancel is present and is not the primary action.

Accessibility

Keyboard and contrast
Keep visible labels, keyboard focus and status announcements when customizing. These components inherit your theme; maintain sufficient contrast in both color modes. The preview is keyboard operable.