Top Gradient Banner
Full-width top banner with emerald-to-zinc gradient, upgrade copy, and dismiss button. Sitewide promo strip with green glow shadow. Ideal for Pro upsells, maintenance notices, and limited-time offers.
Dependencies
react
lucide-react
npm install lucide-reactimport { X } from "lucide-react";
export function TopGradientBanner() {
return (
<div className="relative flex items-center justify-center gap-4 bg-gradient-to-r from-emerald-600 via-emerald-500 to-zinc-600 px-4 py-2.5 text-sm text-white shadow-[0_4px_20px_rgba(16,185,129,0.35),0_1px_0_rgba(255,255,255,0.2)_inset]">
<p className="font-medium">Upgrade to Pro for 2× more CPUs and faster builds</p>
<button type="button" className="absolute right-3 rounded-md p-1 hover:bg-white/15" aria-label="Dismiss">
<X className="h-4 w-4" />
</button>
</div>
);
}
Please implement this code in the current project and add it to (Your Desired Section, e.g. homepage hero, pricing page, dashboard). Change the primary accent color to (YOUR HEX CODE COLOR, e.g. #6366F1).
Requirements:
- Use React + Tailwind CSS (match the project's existing setup)
- Install dependencies if needed: npm install lucide-react
- Keep the layout responsive on mobile and desktop
- Replace placeholder copy with content that fits the project
The UI code:
import { X } from "lucide-react";
export function TopGradientBanner() {
return (
<div className="relative flex items-center justify-center gap-4 bg-gradient-to-r from-emerald-600 via-emerald-500 to-zinc-600 px-4 py-2.5 text-sm text-white shadow-[0_4px_20px_rgba(16,185,129,0.35),0_1px_0_rgba(255,255,255,0.2)_inset]">
<p className="font-medium">Upgrade to Pro for 2× more CPUs and faster builds</p>
<button type="button" className="absolute right-3 rounded-md p-1 hover:bg-white/15" aria-label="Dismiss">
<X className="h-4 w-4" />
</button>
</div>
);
}
Replace (Your Desired Section) and (YOUR HEX CODE COLOR) before pasting into Cursor, Copilot, or ChatGPT.