Quick start
Get a working toast with the core API. This path works in any JavaScript app. Framework helpers are optional.
1. Install
npm install alert-notify2. Call toast
import { toast } from "alert-notify";
toast.success("Your profile was saved.", { title: "Profile updated" });
toast.error("Please try again.", { title: "Something went wrong" });
toast.promise(save(), {
loading: "Saving…",
success: "Saved",
error: (err) => (err instanceof Error ? err.message : "Failed"),
});3. Optional defaults
toast.config({
position: "top-right",
theme: "light",
richColors: true,
});
// Per-toast overrides
toast.info("Heads up", {
position: "bottom-left",
richColors: true,
className: "my-toast",
onOpen: () => {},
});Next, pick a stack guide under Choose integration, or open theplayground.