1 Alert
Byron edited this page 2026-10-02 22:28:43 +02:00

Basic

<CleanAlert>
	Hello world!
</CleanAlert>

Types

<CleanAlert Type="@(CleanAlertType.Info)">
	Hello world!
</CleanAlert>

<CleanAlert Type="@(CleanAlertType.Success)">
	Hello world!
</CleanAlert>

<CleanAlert Type="@(CleanAlertType.Warning)">
	Hello world!
</CleanAlert>

<CleanAlert Type="@(CleanAlertType.Danger)">
	Hello world!
</CleanAlert>

<CleanAlert Type="@(CleanAlertType.Primary)">
	Hello world!
</CleanAlert>

<CleanAlert Type="@(CleanAlertType.Secondary)">
	Hello world!
</CleanAlert>

With icon

When adding the ShowIcon parameter, the component will show an icon that corresponds to the alert's Type parameter.

You can overwrite the alert's icon using the IconContent parameter.

<CleanAlert ShowIcon>
	This alert has an icon.
</CleanAlert>

<CleanAlert Type="@(CleanAlertType.Success)" ShowIcon>
	This alert has an icon.
</CleanAlert>

<CleanAlert Type="@(CleanAlertType.Warning)" ShowIcon>
	This alert has an icon.
</CleanAlert>

<CleanAlert Type="@(CleanAlertType.Danger)" ShowIcon>
	This alert has an icon.
</CleanAlert>

<CleanAlert IconContent="@(Icons.User)">
	This alert has the <code>User</code> icon.
</CleanAlert>

<CleanAlert>
	<IconContent>
		^_^
	</IconContent>
	<ChildContent>
		The alert's <code>IconContent</code> doesn't have to be an icon!
	</ChildContent>
</CleanAlert>

With title

You can adjust the title's heading level using the TitleLevel parameter.

<CleanAlert>
	<TitleContent>
		Hello!
	</TitleContent>
	<ChildContent>
		This alert has a title.
	</ChildContent>
</CleanAlert>

<CleanAlert ShowIcon>
	<TitleContent>
		Hello!
	</TitleContent>
	<ChildContent>
		This alert has a title AND an icon.
	</ChildContent>
</CleanAlert>


<CleanAlert TitleLevel="@(1)" ShowIcon>
	<TitleContent>
		Hello!
	</TitleContent>
	<ChildContent>
		This alert has a title AND an icon.
	</ChildContent>
</CleanAlert>