Simple Hot Toast - SHT

Toasts made simple. Pure JS. React-style. No fluff.
A lightweight, zero-dependency toast notification library inspired by React Hot Toast.
Library developed by Vinay Chaudhary.
๐Ÿ”— GitHub  |  โ˜• Support me

๐Ÿงช Live Demo

Click buttons to trigger toasts:

๐Ÿš€ Installation

Include this in your HTML:

<script src="https://cdn.jsdelivr.net/gh/vinayofc/simple-hot-toast/toast.min.js"></script>

๐Ÿ“ฆ Basic Usage

toast.success("Success!");
toast.error("Something went wrong.");
toast.loading("Please wait...", { autoCompleteAfter: 3000 });

๐ŸŽฏ API Reference

๐Ÿ“ Positions

"top-left" | "top-center" | "top-right"
"bottom-left" | "bottom-center" | "bottom-right"

๐Ÿ’ก Custom HTML Toast

toast.custom("<strong style='color: green;'>โœ… Done!</strong>", {
  position: "bottom-center"
});

๐Ÿ”„ Async Handling with toast.promise

toast.promise(fetch(url), {
  loading: "Loading...",
  success: "Done!",
  error: "Failed!"
});