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 | Default | Type |
|---|---|---|
ChildContent | null | RenderFragment |
The content to be rendered inside the Toaster component. | ||
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 | ||
Toast
| 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. | ||
Visible | false | bool |
Specifies the visibility state of the Toast. | ||
Events
Toast
| Event | Type |
|---|---|
Closed | EventCallback |
Event callback for when the Toast has been closed. | |
Closing | Func<ToastClosingEventArgs, Task> |
Callback for handling the closing of the Toast. | |
Opened | EventCallback |
Event callback for when the Toast has been opened. | |
Opening | Func<ToastOpeningEventArgs, Task> |
Callback for handling the opening of the Toast. | |
VisibleChanged | EventCallback<bool> |
Event callback for when the visibility state of the Toast changes. | |
Methods
Toast
| Method | Return | Parameters |
|---|---|---|
Close | Task | CloseReason closeReason |
Closes the toast with reason of closing.
| ||
Hide | Task | — |
Fires the toast dialog closure process.
| ||
Show | Task | — |
Starts the toast opening process.
| ||