Blazorise Toast Provider API
Review the provider component and service methods used to display and configure toast notifications.
For setup instructions and examples, see the Toast Provider documentation.
API
Parameters
| Parameter | Default | Type |
|---|---|---|
Animated | true | bool |
Specifies whether the Toast should have an animated transition. | ||
AnimationDuration | 300 | int |
The duration of the animation in milliseconds. | ||
Autohide | true | bool |
Automatically hide the toast after the delay. | ||
AutohideDelay | 5000 | double |
Delay in milliseconds before hiding the toast. | ||
ChildContent | null | RenderFragment |
The content to be rendered inside the Toast. | ||
Placement | BottomEnd | ToasterPlacement |
Specifies the position of the Toaster component. Possible values: TopTopStartTopEndBottomBottomStartBottomEnd | ||
PlacementStrategy | Fixed | ToasterPlacementStrategy |
Specifies the placement strategy of the Toaster component. Possible values: FixedAbsolute | ||
ShowCloseButton | true | bool |
Specifies the visibility of the close button. | ||
ShowIntentIcon | true | bool |
Specifies the visibility of the intent icon. | ||
Events
| Event | Type |
|---|---|
Closed | EventCallback |
Occurs after the toast has closed. This is a Global Option. | |
Closing | Func<ToastClosingEventArgs, Task> |
Occurs before the toast is closed. Global Option. | |
Opened | EventCallback |
Occurs after the toast has opened. This is a Global Option. | |
Opening | Func<ToastOpeningEventArgs, Task> |
Occurs before the toast is opened. Global Option. | |
Methods
| Method | Return | Parameters |
|---|---|---|
Show | Task | string title, MarkupString message, ToastIntent intent, ToastInstanceOptions options |
Show the simple info toast message.
| ||
Show | Task | string title, string message, ToastIntent intent |
Show the simple info toast message.
| ||
IToastService
Events
| Event | Type |
|---|---|
ToastReceived | EventHandler<ToastEventArgs> |
Raised when a toast request is received by the provider.
| |
Methods
| Method | Return | Parameters |
|---|---|---|
Show | Task | message, title = null, options = null |
Shows a toast with the default intent. String and MarkupString overloads are available.
| ||
Info | Task | message, title = null, options = null |
Shows an informational toast. String and MarkupString overloads are available.
| ||
Success | Task | message, title = null, options = null |
Shows a success toast. String and MarkupString overloads are available.
| ||
Warning | Task | message, title = null, options = null |
Shows a warning toast. String and MarkupString overloads are available.
| ||
Error | Task | message, title = null, options = null |
Shows an error toast. String and MarkupString overloads are available.
| ||