stnd.buildSTANDARD MANUAL2026-09-20

Toast

On this page

Zero-dependency notification system. Mount once (Standard does this by default); afterward, call the global window.toast() helper from anywhere — no import needed, since the component itself dispatches/listens for a toast custom event.

Fire a toast

window.toast("Saved!", "success");
window.toast("Something went wrong", "error", 6000, {
  label: "Retry",
  onClick: "myRetryFn",
});

Live example