easyui.

Discover / Overlay

Alert dialog

Ask for confirmation before an action.

Usage notes

Use for consequential decisions and provide a clear way to cancel.

Examples use @easyui/react and its stylesheet. Read the setup guide.

Example source

import { AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogTitle, AlertDialogTrigger, Button } from "@easyui/react";

export default function Example() {
  return (
    <AlertDialog>
      <AlertDialogTrigger render={<Button variant="secondary">Archive project</Button>} />
      <AlertDialogContent><AlertDialogTitle>Archive this project?</AlertDialogTitle><AlertDialogDescription>You can restore it later.</AlertDialogDescription><AlertDialogFooter><AlertDialogClose render={<Button variant="secondary">Cancel</Button>} /><AlertDialogClose render={<Button>Archive</Button>} /></AlertDialogFooter></AlertDialogContent>
    </AlertDialog>
  );
}

Explore more components