WlToast
Toast container with semantic tone. Display through useWlToast().show; existing methods and severity remain available.
Basic example
Four notification types
useWlToast().show displays a semantic tone through the application's existing container; old helper methods remain supported.
Notifications shown: 0.
One application container receives all messages. Also show important errors near the affected field or action.
Connecting the service
Register WlToastService with the Vue application and add one WlToast to App.vue. Each application has its own service state. Import styles as described in the installation section.
main.ts · service and container
import { createApp } from "vue";
import { WlToastService } from "legato-ui";
import App from "./App.vue";
const app = createApp(App);
app.use(WlToastService);
app.mount("#app");
// One container in the root App.vue: WlToast.
// import { WlToast } from "legato-ui";
// <WlToast />