About
A dismissible, color-coded bar for site-wide or page-wide messages like promotions, maintenance notices, or trial reminders.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Banner to your project and fits it to your theme.
Code
How Banner is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { Megaphone } from "lucide-react";
import {
Banner,
BannerAction,
BannerClose,
BannerContent,
BannerDescription,
BannerTitle,
} from "@/components/ui/banner";
import { Button } from "@/components/ui/button";
export default function BannerDemo() {
return (
<Banner variant="primary">
<Megaphone />
<BannerContent>
<BannerTitle>Launch week: 30% off annual plans</BannerTitle>
<BannerDescription>Ends Friday, Oct 23.</BannerDescription>
</BannerContent>
<BannerAction>
<Button size="sm" variant="secondary">
Upgrade
</Button>
<BannerClose />
</BannerAction>
</Banner>
);
}








