Basic Usage
With Icons
Pass anicon prop to render a lucide icon alongside the alert content. The icon automatically aligns with the title and description.
Variants
Five variants cover different semantic intents — from neutral information to success confirmations and error states.Without Title
For simple messages, you can use just a description:In Context
Alerts work well inside cards or at the top of a page to communicate status:API Reference
Alert Parameters
Visual style:
"default", "destructive", "success", "warning", "info".Lucide icon name in kebab-case (e.g.,
"circle-alert", "circle-check"). Browse icons at lucide.dev/icons.Additional Tailwind CSS classes.
Protocol Reference
Alert
AlertTitle
AlertDescription