Banner 10 – Inline announcement link
shadcncraft/banner-10FreeBlock
A minimal announcement banner for low-friction updates. Renders as simple inline text with an optional icon and link, plus a close action. Best for subtle product news or secondary announcements that shouldn't compete with primary page content.
Install it
npx shadcn@latest add https://shadcncraft.com/r/banner-10.jsonSource
1"use client";23import { useState } from "react";45import { IconPlaceholder } from "@/registry/icons/icon-placeholder";6import { Button } from "@/components/ui/button";78export function Banner10() {9 const [isVisible, setIsVisible] = useState(true);1011 if (!isVisible) return null;1213 return (14 // To make the banner fixed, add classes like `fixed top-0 inset-x-0 z-50` to the container element15 <aside16 role="banner"17 aria-label="Promotional banner"18 className="w-full bg-muted py-4 text-muted-foreground"19 >20 {/* Banner Container */}21 <div className="mx-auto max-w-7xl px-8">22 <div className="flex flex-row items-start justify-between gap-9 lg:items-center">23 {/* Banner Content */}24 <div className="flex flex-1 items-start gap-1">25 <IconPlaceholder26 lucide="AlertCircle"27 tabler="IconAlertCircle"28 hugeicons="Alert02Icon"29 phosphor="WarningCircleIcon"30 remixicon="RiErrorWarningLine"31 className="mt-1 size-4 shrink-0"32 />3334 <p className="text-base text-pretty">35 <span className="font-semibold">New from Acme Inc: </span>36 AI Productivity Suite.{" "}37 <a href="#" className="underline">38 Check it out39 </a>40 </p>41 </div>4243 {/* Close Button */}44 <Button45 size="icon-sm"46 className="size-6 shrink-0 max-lg:-mt-1 max-lg:-mr-1"47 variant="ghost"48 onClick={() => setIsVisible(false)}49 aria-label="Close banner"50 >51 <IconPlaceholder52 lucide="X"53 tabler="IconX"54 hugeicons="Cancel01Icon"55 phosphor="XIcon"56 remixicon="RiCloseLine"57 />58 </Button>59 </div>60 </div>61 </aside>62 );63}
What it pulls in
Other registry items
Files it writes
More from shadcncraft
All 26 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Benefits 13 – Card grid with section headerbenefits-13 | shadcncraft | Blocks | Free | no deps | |
| Contact 11 – Centered form with supporting sidebarcontact-11 | shadcncraft | Blocks | Free | no deps | |
| FAQ 4 – Centered accordion with supporting panelfaqs-4 | shadcncraft | Blocks | Free | no deps | |
| Footer 4 – Brand-led sitemap footerfooter-4 | shadcncraft | Blocks | Free | 1 dep | |
| Newsletter Signup 5 – Inline callout with contained formnewsletter-signup-5 | shadcncraft | Blocks | Free | no deps | |
| Testimonial 11 – Editorial quote gridtestimonials-11 | shadcncraft | Blocks | Free | no deps | |
| Top Navigation 5 – Minimal center-aligned links with inline authtop-navigation-5 | shadcncraft | Blocks | Free | no deps |
