banner-09-block
stackzero/banner-09-blockFreeBlock
stackzero publishes no description for this item.
Install it
npx shadcn@latest add https://ui.stackzero.co/r/banner-09-block.jsonSource
1"use client";2import { Sun } from "lucide-react";3import React, { useState } from "react";45function Banner_09() {6 // State to control banner visibility7 const [isVisible, setIsVisible] = useState(true);8 // State to control promo code copy action9 const [copied, setCopied] = useState(false);1011 // Hide banner when user dismisses it12 const dismissBanner = () => {13 setIsVisible(false);14 };1516 // Handle copy promo code17 const copyPromoCode = () => {18 navigator.clipboard.writeText("SPRING25");19 setCopied(true);20 setTimeout(() => setCopied(false), 2000);21 };2223 if (!isVisible) return null;2425 return (26 <div className="relative w-full overflow-hidden bg-gradient-to-r from-purple-600 to-indigo-500 px-6 py-5 shadow-lg">27 {/* Animated background elements */}28 <div className="absolute inset-0 overflow-hidden">29 <div className="absolute -top-20 -left-20 h-48 w-48 animate-pulse rounded-full bg-white opacity-10"></div>30 <div className="absolute top-5 right-10 h-20 w-20 animate-bounce rounded-full bg-white opacity-10 delay-300"></div>31 <div className="absolute bottom-4 left-1/3 h-24 w-24 animate-ping rounded-full bg-white opacity-10 [animation-duration:3s]"></div>32 <div className="absolute -right-10 -bottom-10 h-40 w-40 animate-pulse rounded-full bg-white opacity-10 delay-700"></div>33 </div>3435 <div className="relative z-10 flex flex-col items-center justify-between gap-5 md:flex-row">36 <div className="flex items-center justify-center gap-4 text-center md:justify-start md:text-left">37 <div className="hidden animate-spin duration-9000 md:block">38 <Sun className="h-16 w-16 text-white" />39 </div>40 <div className="space-y-1">41 <span className="inline-flex animate-pulse rounded-md bg-white px-3 py-1 text-sm font-bold text-indigo-600 shadow-sm">42 25% OFF EVERYTHING43 </span>44 <h3 className="text-2xl font-bold text-white md:text-3xl">45 Spring Sale Event46 </h3>47 <p className="text-base font-medium text-white/90">48 Use code{" "}49 <span className="rounded bg-white/20 px-2 py-0.5 font-bold tracking-wider text-white">50 SPRING2551 </span>{" "}52 at checkout53 </p>54 </div>55 </div>5657 <div className="flex items-center space-x-4">58 <button59 onClick={copyPromoCode}60// … truncated
What it pulls in
npm packages
Files it writes
More from stackzero
All 112 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| address-01-blockaddress-01-block | stackzero | Blocks | Free | 4 deps | |
| address-02-blockaddress-02-block | stackzero | Blocks | Free | 4 deps | |
| address-03-blockaddress-03-block | stackzero | Blocks | Free | 4 deps | |
| banner-01-blockbanner-01-block | stackzero | Blocks | Free | no deps | |
| banner-02-blockbanner-02-block | stackzero | Blocks | Free | no deps | |
| banner-03-blockbanner-03-block | stackzero | Blocks | Free | no deps | |
| banner-04-blockbanner-04-block | stackzero | Blocks | Free | no deps | |
| banner-05-blockbanner-05-block | stackzero | Blocks | Free | no deps |
