Examples
Normal, Info, Success, Warning and Error map to the theme's alert colours and pick a fitting icon.
Filled is the default; Text gives daisyUI's soft tint and Outlined keeps only the border.
Icon overrides the severity icon, NoIcon removes it, and Dense tightens the padding.
Playground
<Alert Severity="Severity.Success">Your invoice is on its way.</Alert>API
<Alert>
DaisyBlazorParameters
- Dense bool= false
Reduces vertical padding (py-2).
- Icon string= null
Explicit icon ligature; overrides the severity default when set.
- NoIcon bool= false
Suppress the leading severity icon.
- Role string= null
ARIA role of the alert. When null (default), Warning and Error use the assertive alert role and the other severities the polite status role.
- Severity Severity= Severity.Normal
Alert color (alert-info, alert-success, alert-warning, alert-error) and default icon; Normal is neutral.
- Variant Variant= Variant.Filled
Filled (default) is solid; Outlined adds alert-outline; Text adds alert-soft.
- Class string= null
Extra CSS classes added to the alert.
- Style string= null
Inline CSS style applied to the alert.
Content
- ChildContent RenderFragment
Message content rendered next to the icon.
From MudAlert
Alert keeps MudAlert's parameter names, so most markup moves over by
dropping the Mud prefix. See the migration guide for the shared enums, icons and services.