Toasts
NotificationService · NotificationDisplayControlTell users an action worked or failed with toasts that close themselves.
Overview
NotificationService shows Blazor toast notifications: short info, success, warning and error messages that stack in the top-right corner and close themselves. Use them to confirm a saved goods receipt or report a failed label print without interrupting work; call the service from any component, and one NotificationDisplayControl in the layout shows them all. An error stays ten seconds and a success four, and durationMs: 0 keeps a toast until it is closed or removed with Dismiss.
Examples
#Levels, detail and duration
Raise each level; the second argument is the detail line and durationMs: 0 keeps a toast until it is closed.
No toasts showing.
#Progress, then the outcome
Save the goods receipt: a sticky toast shows while the save runs, Dismiss removes it by id, and a success or an error toast takes its place. Switch on Make saves fail and every save fails until you switch it off; the error toast stays until it is closed or the next save starts.
0 saved, 0 failed