a-toast
Implemented with Toast.
Toast
A single toast element.
Example
import "@atrium-ui/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>`;
Events
Name | Description |
---|---|
killed
|
Fires when the toast is killed. |
Methods
ToastFeed
A feed of toast elements. Handles the positioning and animations of the toasts.
Example
import "@atrium-ui/elements/toast";
<a-portal> <a-toast-feed class="fixed right-12 bottom-12 text-base" /></a-portal>