Bootstrap Toast component. Not intended to be used in user code, use HxMessenger
.
After the first render, the component never updates.
HxToast
is usually not used directly, but as a part of HxMessenger
component.
See HxMessenger documentation.
You can use HxToast
directly to show a toast. Usually you will use it in combination with HxToastContainer
.
HxToast
supports static server rendering.
Name | Type | Description |
---|---|---|
AutohideDelay | int? |
Delay in milliseconds to automatically hide the toast. |
Color | ThemeColor? |
Color scheme. |
ContentTemplate | RenderFragment |
Content (body) template. |
ContentText | string |
Content (body) text. |
CssClass | string |
CSS class to render with the toast. |
HeaderIcon | IconBase |
Header icon. |
HeaderTemplate | RenderFragment |
Header template. |
HeaderText | string |
Header text. |
ShowCloseButton | bool |
Indicates whether to show the close button. |
Name | Type | Description |
---|---|---|
OnToastHidden | EventCallback |
Fires when the toast is hidden (button or autohide). |
Name | Description | Default |
---|---|---|
--hx-toast-container-margin | Margin of the container. | 0.5rem |
Name | Type | Description |
---|---|---|
ChildContent | RenderFragment |
Toasts to display. |
CssClass | string |
Additional CSS class. |
Position | ToastContainerPosition |
Positioning of the toasts on the screen. |