# dp-toast A transient notification host. It stacks short messages in the bottom-right corner and fades each one out. A single instance is created by `Application.js` and reachable as `app.toast`. Source: `static/js/components/AppToast.js`. ## Methods | Method | Description | |---|---| | `show(message, options)` | Display `message`. Options: `type` (`info`, `success`, `error`; default `info`) and `ms` (lifetime in milliseconds, default `3000`). Returns the toast element. | ## Usage ```html <dp-toast></dp-toast> ``` ```javascript app.toast.show("Saved", { type: "success" }); app.toast.show("Something went wrong", { type: "error", ms: 5000 }); ``` The element renders nothing until `show` is called.
Live example