Toasts
Universal Dashboard is now a part of PowerShell Universal. This documentation is for reference to the v2 version of Universal Dashboard and is no longer maintained.
PowerShell Universal Documentation can be found here.

Toasts

Show-UDToast is used to show toasts to the end user. You can show a toast message from any endpoint (dynamic) component. You cannot show toasts from Scheduled Endpoints.

Showing a Basic Toast

1
New-UDButton -Text "Show Toast" -OnClick {
2
Show-UDToast -Message "Hello"
3
}
Copied!
Basic Toast

Customizing the Colors

1
New-UDButton -Text "Show Toast" -OnClick {
2
Show-UDToast -Message "Hello" -BackgroundColor red -MessageColor white
3
}
Copied!
Custom Colors

Toast Title

1
New-UDButton -Text "Show Toast" -OnClick {
2
Show-UDToast -Message "World" -Title "Hello"
3
}
Copied!
Toast with a Title

Changing Positions

1
New-UDButton -Text "Show Toast" -OnClick {
2
Show-UDToast -Message "Hello" -Position topLeft
3
}
Copied!
Toast in the Top Left

Balloon Toast

1
New-UDButton -Text "Show Toast" -OnClick {
2
Show-UDToast -Message "Hello" -Balloon
3
}
Copied!
Showing a balloon toast

Duration of Toasts

1
New-UDButton -Text "Show Toast" -OnClick {
2
Show-UDToast -Message "Hello" -Duration 30000
3
}
Copied!
30 Second Toast

Transitions

1
New-UDButton -Text "Show Toast" -OnClick {
2
Show-UDToast -Message "Hello" -TransitionIn bounceInRight
3
}
Copied!
Bounce in Transition
Last modified 8mo ago