Implemented with Toast.
A single toast element.
import "@sv/elements/toast"; // create a toas and keep a reference to itconst toast = new Toast({ message: "A Message" });const feed = ToastFeed.getInstance(); // the a-toast-feed elementfeed?.append(toast); // optionally slot any content into the toasttoast.innerHTML = ` <span>Custom HTML content</span>`;
killed
Fires when the toast is killed.
Toast.kill()
Kills the toast and removes it from the DOM.
A feed of toast elements. Handles the positioning and animations of the toasts.
import "@sv/elements/toast"; <a-portal> <a-toast-feed class="fixed right-12 bottom-12 text-base" /></a-portal>