About
A dismissible banner for showing status messages (info, success, warning, error) with an optional title and close button.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Alert to your project and fits it to your theme.
Code
How Alert is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import Alert from "@/components/ui/alert";
export default function AlertDemo() {
return (
<div style={{ display: "grid", gap: 12, maxWidth: 480 }}>
<Alert variant="info" title="Heads up">
This is an info alert.
</Alert>
<Alert variant="success" title="Saved">
Your changes were saved successfully.
</Alert>
<Alert variant="warning" title="Careful">
You have unsaved changes.
</Alert>
<Alert variant="error" title="Failed">
Could not save. Please try again.
</Alert>
</div>
);
}







