In this demo, you can show a toast by clicking the button below. It will hide itself after a 5 seconds delay unless you simply hover it with your mouse.

@if (show) {
@if (autohide) {
Try to mouse hover me.
} @else {
I will remain visible until you leave again.
}
}