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

ParameterDefaultType
Animatedtruebool

Specifies whether the Toast should have an animated transition.
AnimationDuration300int

The duration of the animation in milliseconds.
Autohidetruebool

Automatically hide the toast after the delay.
AutohideDelay5000double

Delay in milliseconds before hiding the toast.
ChildContentnullRenderFragment

The content to be rendered inside the Toast.
PlacementBottomEndToasterPlacement

Specifies the position of the Toaster component.
Possible values:TopTopStartTopEndBottomBottomStartBottomEnd
PlacementStrategyFixedToasterPlacementStrategy

Specifies the placement strategy of the Toaster component.
Possible values:FixedAbsolute
ShowCloseButtontruebool

Specifies the visibility of the close button.
ShowIntentIcontruebool

Specifies the visibility of the intent icon.

Events

EventType
ClosedEventCallback

Occurs after the toast has closed. This is a Global Option.
ClosingFunc<ToastClosingEventArgs, Task>

Occurs before the toast is closed. Global Option.
OpenedEventCallback

Occurs after the toast has opened. This is a Global Option.
OpeningFunc<ToastOpeningEventArgs, Task>

Occurs before the toast is opened. Global Option.

Methods

MethodReturnParameters
ShowTaskstring title, MarkupString message, ToastIntent intent, ToastInstanceOptions options

Show the simple info toast message.
ShowTaskstring title, string message, ToastIntent intent

Show the simple info toast message.

IToastService

Events

EventType
ToastReceivedEventHandler<ToastEventArgs>

Raised when a toast request is received by the provider.

Methods

MethodReturnParameters
ShowTaskmessage, title = null, options = null

Shows a toast with the default intent. String and MarkupString overloads are available.
InfoTaskmessage, title = null, options = null

Shows an informational toast. String and MarkupString overloads are available.
SuccessTaskmessage, title = null, options = null

Shows a success toast. String and MarkupString overloads are available.
WarningTaskmessage, title = null, options = null

Shows a warning toast. String and MarkupString overloads are available.
ErrorTaskmessage, title = null, options = null

Shows an error toast. String and MarkupString overloads are available.
On this page