AstrolUI AstrolUI
Yellow Orange Red Green Blue Purple Custom color
Light mode
Alert

In-page messages: information, success, warning or error.

1. Demo AstrolAlert

Unlike notifications, an alert stays on the page until the situation changes (or the user closes it with Closable). Error and warning alerts are announced right away to screen readers.

Your trial ends in 5 days.
Saved
The customer was updated.
New: tabs, checkboxes and radios.
@using Astrol.Component.Basic.Alert
 
<AstrolAlert Text="Your trial ends in 5 days." />
<AstrolAlert Status="AstrolStatus.Success" Title="Saved" Text="The customer was updated." Closable="true" />
<AstrolAlert Status="AstrolStatus.Warning" Text="Some fields are empty." />
<AstrolAlert Status="AstrolStatus.Danger" Title="Could not save" Text="The server did not respond.">
 <Actions>
 <AstrolButton Text="Retry" Icon="astrol-arrows-cw" Style="AstrolStyle.Red" />
 <AstrolButton Text="Details" Style="AstrolStyle.White" />
 </Actions>
</AstrolAlert>
<AstrolAlert Status="AstrolStatus.Brand" Icon="astrol-flash" Text="New: tabs, checkboxes and radios." />

Supported parameters

  • Status (AstrolStatus), Info (default), Success, Warning, Danger, Brand or Neutral: color and icon.
  • Title (string), bold title (optional).
  • Text (string) or ChildContent (RenderFragment), the message.
  • Actions (RenderFragment), buttons or links below the message.
  • Icon (string), own icon; ShowIcon (bool), show the icon (default true).
  • Closable (bool), close button; OnClose (EventCallback) when closed; CloseText (string); Show() shows it again.
  • Class (string), extra css class.
Markdown for AI © 2026 AstrolUI v10.0.13