Alert Component

Displays a callout for important messages that attract user attention.

Variants

Seven semantic variants for different message types.

With Accent Border

Use AccentBorder="true" to display a thick left border with a subtle tinted background.

Without Icons

Alerts can be used without icons for simpler messages.

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.

An unhandled error has occurred. Reload 🗙