Alert
Displays a callout for important information, with support for different variants like default and destructive.
Heads up!
You can add components using the CLI.
Installation
npx shadcn add alert --registry https://ui.ch.sh/r
Usage
import { Alert, AlertTitle, AlertDescription } from "@/components/ui/alert"
export default function Example() {
return (
<Alert>
<AlertTitle>Heads up!</AlertTitle>
<AlertDescription>
You can add components using the CLI.
</AlertDescription>
</Alert>
)
}Examples
Destructive
Error
Something went wrong. Please try again.