This component no longer exists. It was in ruixen-ui’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-12 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.
Banner Announcement
ruixen-ui/banner-announcementRemovedComponent
A dismissible announcement banner with multiple variants and action links.
Live preview
live · rendered by the registry
Rendered by ruixen-ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://ruixen.com/r/banner-announcement.jsonSource
1"use client";23import * as React from "react";4import { cn } from "@/lib/utils";5import { ArrowRight, X } from "lucide-react";67export interface BannerAnnouncementProps {8 children: React.ReactNode;9 badge?: string;10 action?: { label: string; href: string };11 dismissible?: boolean;12 onDismiss?: () => void;13 className?: string;14}1516export function BannerAnnouncement({17 children,18 badge,19 action,20 dismissible = true,21 onDismiss,22 className,23}: BannerAnnouncementProps) {24 const [mounted, setMounted] = React.useState(false);25 const [dismissed, setDismissed] = React.useState(false);2627 React.useEffect(() => {28 requestAnimationFrame(() => {29 requestAnimationFrame(() => setMounted(true));30 });31 }, []);3233 const handleDismiss = () => {34 setDismissed(true);35 if (onDismiss) setTimeout(onDismiss, 350);36 };3738 return (39 <div40 className={cn(41 "grid transition-[grid-template-rows] ease-[cubic-bezier(0.16,1,0.3,1)]",42 mounted && !dismissed43 ? "[grid-template-rows:1fr] duration-500"44 : "[grid-template-rows:0fr] duration-300",45 )}46 >47 <div className="overflow-hidden">48 <div49 className={cn(50 "relative flex items-center justify-center gap-2.5 border-b px-10 py-2.5 text-sm",51 "bg-muted/40",52 /* ── shimmer sweep ── */53 "before:pointer-events-none before:absolute before:inset-0",54 "before:bg-[length:250%_100%] before:bg-no-repeat",55 "before:bg-[linear-gradient(110deg,transparent_30%,hsl(var(--foreground)/0.04)_44%,hsl(var(--foreground)/0.08)_50%,hsl(var(--foreground)/0.04)_56%,transparent_70%)]",56 "before:animate-[banner-shimmer_1.8s_ease-out_0.3s_1_both]",57 /* ── content fade on dismiss ── */58 "transition-[opacity,transform] duration-150",59 dismissed && "opacity-0 -translate-y-1",60 className,61 )}62 >63 {badge && (64 <span className="shrink-0 rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary">65 {badge}66 </span>67 )}6869 <p className="text-center font-medium text-foreground/80">70 {children}71 </p>7273 {action && (74 <a75 href={action.href}76 className="group inline-flex shrink-0 items-center gap-0.5 font-semibold text-foreground transition-colors hover:text-foreground/70"77 >78// … truncated
What it pulls in
npm packages
