Blazorise Toast API
Explore the Blazorise Toast API reference for parameters, events, methods, and related types.
For examples and usage guidance, see the Toast documentation.
API
Parameters
Toaster
| Parameter | Description | Type | Default |
|---|---|---|---|
ChildContent |
The content to be rendered inside the Toaster component. |
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 |
Toast
| 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 |
Visible |
Specifies the visibility state of the Toast. |
bool | false |
Events
Toast
| Event | Description | Type |
|---|---|---|
Closed |
Event callback for when the Toast has been closed. |
EventCallback |
Closing |
Callback for handling the closing of the Toast. |
Func<ToastClosingEventArgs, Task> |
Opened |
Event callback for when the Toast has been opened. |
EventCallback |
Opening |
Callback for handling the opening of the Toast. |
Func<ToastOpeningEventArgs, Task> |
VisibleChanged |
Event callback for when the visibility state of the Toast changes. |
EventCallback<bool> |
Methods
Toast
| Method | Description | Return | Parameters |
|---|---|---|---|
Close |
Closes the toast with reason of closing. | Task | CloseReason closeReason |
Hide |
Fires the toast dialog closure process. | Task | |
Show |
Starts the toast opening process. | Task |