Quick search...K

    Model Card

    A component for displaying modal cards. It provides a flexible and customizable interface for actions requiring confirmation.

    Usage Examples

    Basic Usage

    Use the modal to confirm actions like deletions or submissions.

    <AlertDialog>
        <AlertDialogTrigger asChild>
          <button className="btn btn-primary">Open Modal</button>
        </AlertDialogTrigger>
        <AlertDialogContent>
          <AlertDialogHeader>
            <AlertDialogTitle>Modal Title</AlertDialogTitle>
            <AlertDialogDescription>
              Modal description goes here.
            </AlertDialogDescription>
          </AlertDialogHeader>
          <AlertDialogFooter>
            <AlertDialogCancel>Cancel</AlertDialogCancel>
            <AlertDialogAction>Confirm</AlertDialogAction>
          </AlertDialogFooter>
        </AlertDialogContent>
    </AlertDialog>

    Custom Trigger Button

    You can use any custom button or element to trigger the modal.

    <AlertDialog>
        <AlertDialogTrigger asChild>
          <button className="custom-trigger">Click Me</button>
        </AlertDialogTrigger>
        <AlertDialogContent>
          <AlertDialogHeader>
            <AlertDialogTitle>Custom Trigger</AlertDialogTitle>
          </AlertDialogHeader>
          <AlertDialogFooter>
            <AlertDialogCancel>Close</AlertDialogCancel>
          </AlertDialogFooter>
        </AlertDialogContent>
    </AlertDialog>