Note
To notify the user with dynamic alerts which overlay the page check out Snackbar.
Simple alerts
There are five severity levels that each set a different icon and a color.
<MudAlert Severity="Severity.Normal">The reactor type is RBMK-1000</MudAlert> <MudAlert Severity="Severity.Info">The reactor was fired up successfully</MudAlert> <MudAlert Severity="Severity.Success">The reactor is running at optimum temperature</MudAlert> <MudAlert Severity="Severity.Warning">The reactor temperature exceeds the optimal range</MudAlert> <MudAlert Severity="Severity.Error">Meltdown is imminent</MudAlert>
Variants
The default variant is text. In addition to that, outlined and filled is available.
Outlined
<MudAlert Severity="Severity.Normal" Variant="Variant.Outlined">The reactor type is RBMK-1000</MudAlert> <MudAlert Severity="Severity.Info" Variant="Variant.Outlined">The reactor was fired up successfully</MudAlert> <MudAlert Severity="Severity.Success" Variant="Variant.Outlined">The reactor is running at optimum temperature</MudAlert> <MudAlert Severity="Severity.Warning" Variant="Variant.Outlined">The reactor temperature exceeds the optimal range</MudAlert> <MudAlert Severity="Severity.Error" Variant="Variant.Outlined">Meltdown is imminent</MudAlert>
Filled
<MudAlert Severity="Severity.Normal" Variant="Variant.Filled">The reactor type is RBMK-1000</MudAlert> <MudAlert Severity="Severity.Info" Variant="Variant.Filled">The reactor was fired up successfully</MudAlert> <MudAlert Severity="Severity.Success" Variant="Variant.Filled">The reactor is running at optimum temperature</MudAlert> <MudAlert Severity="Severity.Warning" Variant="Variant.Filled">The reactor temperature exceeds the optimal range</MudAlert> <MudAlert Severity="Severity.Error" Variant="Variant.Filled">Meltdown is imminent</MudAlert>
Dense
Taking up too much space? Set the Dense
property to true. It removes the vertical padding and lowers the horizontal.
<MudGrid> <MudItem md="4" xs="12"> <MudAlert Severity="Severity.Normal" Dense="true" Class="my-2">Dense Default</MudAlert> <MudAlert Severity="Severity.Info" Dense="true" Class="my-2">Dense Info</MudAlert> <MudAlert Severity="Severity.Success" Dense="true" Class="my-2">Dense Success</MudAlert> <MudAlert Severity="Severity.Warning" Dense="true" Class="my-2">Dense Warning</MudAlert> <MudAlert Severity="Severity.Error" Dense="true" Class="my-2">Dense Error</MudAlert> </MudItem> <MudItem md="4" xs="12"> <MudAlert Severity="Severity.Normal" Variant="Variant.Outlined" Dense="true" Class="my-2">Dense Default</MudAlert> <MudAlert Severity="Severity.Info" Variant="Variant.Outlined" Dense="true" Class="my-2">Dense Info</MudAlert> <MudAlert Severity="Severity.Success" Variant="Variant.Outlined" Dense="true" Class="my-2">Dense Success</MudAlert> <MudAlert Severity="Severity.Warning" Variant="Variant.Outlined" Dense="true" Class="my-2">Dense Warning</MudAlert> <MudAlert Severity="Severity.Error" Variant="Variant.Outlined" Dense="true" Class="my-2">Dense Error</MudAlert> </MudItem> <MudItem md="4" xs="12"> <MudAlert Severity="Severity.Normal" Variant="Variant.Filled" Dense="true" Class="my-2">Dense Default</MudAlert> <MudAlert Severity="Severity.Info" Variant="Variant.Filled" Dense="true" Class="my-2">Dense Info</MudAlert> <MudAlert Severity="Severity.Success" Variant="Variant.Filled" Dense="true" Class="my-2">Dense Success</MudAlert> <MudAlert Severity="Severity.Warning" Variant="Variant.Filled" Dense="true" Class="my-2">Dense Warning</MudAlert> <MudAlert Severity="Severity.Error" Variant="Variant.Filled" Dense="true" Class="my-2">Dense Error</MudAlert> </MudItem> </MudGrid>