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 TypeDefault
Animated

Specifies whether the Toast should have an animated transition.

booltrue
AnimationDuration

The duration of the animation in milliseconds.

int300
Autohide

Automatically hide the toast after the delay.

booltrue
AutohideDelay

Delay in milliseconds before hiding the toast.

double5000
ChildContent

The content to be rendered inside the Toast.

RenderFragmentnull
Placement

Specifies the position of the Toaster component.

Possible values:Top, TopStart, TopEnd, Bottom, BottomStart, BottomEnd

ToasterPlacementToasterPlacement.BottomEnd
PlacementStrategy

Specifies the placement strategy of the Toaster component.

Possible values:Fixed, Absolute

ToasterPlacementStrategyToasterPlacementStrategy.Fixed
ShowCloseButton

Specifies the visibility of the close button.

booltrue
ShowIntentIcon

Specifies the visibility of the intent icon.

booltrue

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 DescriptionReturnParameters
Show Show the simple info toast message. Taskstring title, MarkupString message, ToastIntent intent, ToastInstanceOptions options
Show Show the simple info toast message. Taskstring 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 DescriptionReturnParameters
Show Shows a toast with the default intent. String and MarkupString overloads are available. Taskmessage, title = null, options = null
Info Shows an informational toast. String and MarkupString overloads are available. Taskmessage, title = null, options = null
Success Shows a success toast. String and MarkupString overloads are available. Taskmessage, title = null, options = null
Warning Shows a warning toast. String and MarkupString overloads are available. Taskmessage, title = null, options = null
Error Shows an error toast. String and MarkupString overloads are available. Taskmessage, title = null, options = null
On this page