sweetalert2 exit by custom button click code example Example: sweetalert close on custom button click swal.close()