A styled alert component with variant support (default, info, success, warning, error) and optional action buttons.
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { Terminal } from "lucide-react"; export default function AlertWithIcon() { return ( <div className="flex items-center justify-center w-full min-h-screen bg-background p-8"> <div className="w-full max-w-xl"> <Alert> <Terminal className="size-4" /> <AlertTitle>Heads up!</AlertTitle> <AlertDescription> You can add components and dependencies to your app using the CLI. </AlertDescription> </Alert> </div> </div> ); }
Part of coss — browse the full library on 21st.dev.