Offers and sales
Flash sales, coupons, bundles and the bar on top.
- 5 blocks
- 2 free
- 3 Pro
- Light and dark
- Responsive
Unlock 67 Pro blocks and every template
Every preview is open. With Pro you get the code, copy-paste ready, with every update for good.
Free delivery, cashback and the hotline, scrolling across the top.
announcement-bar.tsx
"use client";
import { Gift, Phone, RotateCcw, Truck, Wallet, X } from "lucide-react";
import * as React from "react";
const MESSAGES = [
{ icon: <Truck />, text: "Free delivery in Dhaka over ৳1,500" },
{ icon: <Wallet />, text: "10% cashback with bKash, up to ৳200" },
{ icon: <RotateCcw />, text: "Free returns for 7 days" },
{ icon: <Gift />, text: "Gift wrap for Eid, free" },
{ icon: <Phone />, text: "Call us from 9 am to 11 pm, every day" },
];
/** The thin bar above a shop: offers that scroll across. It stops on hover and can be closed. */
export default function AnnouncementBar() {
const [open, setOpen] = React.useState(true);
return (
<div className="min-h-[160px] bg-surface">
<style>{`
@keyframes wv-ticker { from { transform: translateX(0) } to { transform: translateX(-100%) } }
@media (prefers-reduced-motion: reduce) { .wv-ticker { animation: none !important } }
`}</style>
{open ? (
<div className="group relative flex items-center bg-[linear-gradient(90deg,#1437d3,#4a4ae8,#7560fd)] text-white">
<div className="flex flex-1 overflow-hidden py-2.5 [mask-image:linear-gradient(90deg,transparent,black_5%,black_95%,transparent)]">
{[0, 1].map((copy) => (
<ul
key={copy}
aria-hidden={copy === 1}
className="wv-ticker flex shrink-0 items-center gap-10 pr-10 [animation:wv-ticker_32s_linear_infinite] group-hover:[animation-play-state:paused]"
>
{MESSAGES.map((m) => (
<li key={m.text} className="flex shrink-0 items-center gap-2 text-[13px] font-medium [&_svg]:size-4 [&_svg]:text-white/80">
{m.icon}
{m.text}
</li>
))}
</ul>
))}
</div>
<button type="button" aria-label="Close the announcement" onClick={() => setOpen(false)} className="mr-2 grid size-7 shrink-0 cursor-pointer place-items-center rounded-full text-white/80 hover:bg-white/15 hover:text-white">
<X className="size-4" />
</button>
</div>
) : (
<button type="button" onClick={() => setOpen(true)} className="m-4 cursor-pointer text-[13px] font-medium text-primary hover:underline">
Show the announcement bar again
</button>
)}
<div className="px-4 py-8 text-center text-[13px] text-muted sm:px-6">Your shop's header goes here.</div>
</div>
);
}A live countdown and stock bars that fill as items sell.
Bundle builder
ProPick any three; the saving grows with each pick.
A prize wheel that spins and lands on a discount code.