Alert

This documentation provides a comprehensive reference for the Alert component, guiding you through its configuration options.
Demos

Screenshot #

Blazor Alert Component

Alert Parameters #

Name Type Default Required Description Added Version
AdditionalAttributes Dictionary<string, object>? null Gets or sets additional attributes that will be applied to the component. 1.0.0
ChildContent RenderFragment? null Gets or sets the content to be rendered within the component. 1.0.0
Class string? null Gets or sets the CSS class name(s) to apply to the component. 1.0.0
Color AlertColor None Gets or sets the alert color. 1.0.0
Dismissable bool False If true, shows an inline close button. 1.0.0
Id string? null Gets or sets the ID. If not set, a unique ID will be generated. 1.0.0
Style string? null Gets or sets the CSS style string that defines the inline styles for the component. 1.0.0

Alert Methods #

Name Return type Description Added Version
CloseAsync() Task Closes an alert by removing it from the DOM. 1.0.0

Alert Events #

Name Return Type Description Added Version
OnClose EventCallback Fires immediately when the close instance method is called. 1.0.0
OnClosed EventCallback Fired when the alert has been closed and CSS transitions have completed. 1.0.0

AlertColor Enum #

Name Value Description Added Version
None 0 No color variant. 1.0.0
Primary 1 Primary color variant. 1.0.0
Secondary 2 Secondary color variant. 1.0.0
Success 3 Success color variant. 1.0.0
Danger 4 Danger color variant. 1.0.0
Warning 5 Warning color variant. 1.0.0
Info 6 Info color variant. 1.0.0
Light 7 Light color variant. 1.0.0
Dark 8 Dark color variant. 1.0.0

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please reload the page.