swal bootstrap code example

Example 1: sweet alert

<script src="https://cdn.jsdelivr.net/npm/sweetalert2@9"></script>

Example 2: sweet alert js

swal({
     title: "Deleted!",
     text: "Your row has been deleted.",
     button: "Close", // Text on button
     icon: "success", //built in icons: success, warning, error, info
     timer: 3000, //timeOut for auto-close
      buttons: {
        confirm: {
          text: "OK",
          value: true,
          visible: true,
          className: "",
          closeModal: true
        },
        cancel: {
          text: "Cancel",
          value: false,
          visible: true,
          className: "",
          closeModal: true,
        }
      }
     });

Example 3: sweet alert bootstrap

Swal.fire({  icon: 'success',  title: 'Oops...',  text: 'Something went wrong!',  footer: '<a href>Why do I have this issue?</a>'})

Example 4: sweet alert bootstrap

Swal.fire(  'Good job!',  'You clicked the button!',  'success')

Example 5: sweet alert bootstrap

swal("Good job!", "You clicked the button!", "error")

Example 6: sweet alert bootstrap

swal("Thank you!", "We will get back to you if required", "success");