Live Demo

Toast · Modal · Confirm (Yes/No) · Loading — one script.

Toast

Modal (center + OK)

Confirm (Yes / No)

Loading

Usage

// init once
Pulse.init({ apiKey:"pn_xxx", baseUrl:"api/notify.php" });

Pulse.success("Saved!");                  // toast
Pulse.modal("success", "Done!");     // modal
const ok = await Pulse.confirm("Delete this?"); // Yes/No
const l = Pulse.loading("Saving...");     // l.close()