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