banner-08-block
stackzero/banner-08-blockFreeBlock
stackzero publishes no description for this item.
Install it
npx shadcn@latest add https://ui.stackzero.co/r/banner-08-block.jsonSource
1"use client";2import React, { useState } from "react";34function Banner_08() {5 // State to control banner visibility6 const [isVisible, setIsVisible] = useState(true);78 // Hide banner when user dismisses it9 const dismissBanner = () => {10 setIsVisible(false);11 };1213 if (!isVisible) return null;1415 return (16 <div className="relative overflow-hidden bg-gradient-to-r from-teal-600 to-cyan-600 px-4 py-3 shadow-md">17 {/* Background decorative elements */}18 <div className="absolute inset-0 flex items-center justify-center opacity-10">19 <div className="h-32 w-32 rotate-12 rounded-full border-4 border-white"></div>20 <div className="absolute -right-6 h-24 w-24 -rotate-12 rounded-full border-4 border-white"></div>21 <div className="absolute -left-8 h-16 w-16 rotate-45 rounded-full border-4 border-white"></div>22 </div>2324 <div className="relative z-10 flex items-center justify-between">25 <div className="flex flex-1 items-center justify-center text-center sm:justify-start sm:text-left">26 <div className="hidden sm:block">27 <svg28 xmlns="http://www.w3.org/2000/svg"29 className="mr-3 h-6 w-6 text-white"30 fill="none"31 viewBox="0 0 24 24"32 stroke="currentColor"33 >34 <path35 strokeLinecap="round"36 strokeLinejoin="round"37 strokeWidth={2}38 d="M13 10V3L4 14h7v7l9-11h-7z"39 />40 </svg>41 </div>42 <p className="flex items-center text-sm font-medium text-white">43 <span className="mr-1.5 hidden rounded-full bg-white px-2 py-0.5 text-xs font-bold text-teal-500 sm:inline-block">44 NEW45 </span>46 <span>47 <span className="font-bold">Free shipping</span> now available on48 all Summer Edition items!49 <a50 href="#"51 className="ml-1.5 whitespace-nowrap underline hover:text-teal-100"52 >53 Shop now →54 </a>55 </span>56 </p>57 </div>58 <button59 className="ml-3 flex-shrink-0 text-white focus:outline-none"60 onClick={dismissBanner}61 aria-label="Dismiss"62 >63 <svg64 xmlns="http://www.w3.org/2000/svg"65 className="h-5 w-5"66 fill="none"67 viewBox="0 0 24 24"68// … truncated
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 |
