Alert Component
Displays a callout for important messages that attract user attention.
Variants
Seven semantic variants for different message types.
Default
Muted
Destructive
Success
Information
Warning
Danger
With Accent Border
Use AccentBorder="true" to display a thick left border with a subtle tinted background.
Success with Accent
Important Note
BlazorUI.Components.Button, BlazorUI.Components.Dialog). Import only the components you use to keep your imports clean.
Tip
Critical Warning
Without Icons
Alerts can be used without icons for simpler messages.
Heads up!
Note
Error
Accessibility
The Alert component uses the ARIA role="alert" attribute to announce important messages to screen readers.
API Reference
Component parameters and their types.
Variant
Type: AlertVariant — Default: Default
The visual style variant. Options: Default, Muted, Destructive, Success, Info, Warning, Danger.
AccentBorder
Type: bool — Default: false
When true, displays a thick left border in the variant's accent color with a subtle tinted background.
Icon
Type: RenderFragment?
Optional icon to display in the alert.
Class
Type: string?
Additional CSS classes to apply to the alert.