Kibo UI
uiannouncementsource: ok · hit
announcement
A compound badge designed to display an announcement.
npx shadcn add "https://www.kibo-ui.com/r/announcement.json"free
Where it goes
banner
Tags auto-generated by rules on 9/24/2026 — empty means no evidence, not lack of support.
Dependencies
Bundle weight · lightRegistry dependencies
badge
Files1 · source cached 10/14/2026, 12:49:39 PM
index.tsx
import type { ComponentProps, HTMLAttributes } from "react";
import { Badge } from "@/components/ui/badge";
import { cn } from "@/lib/utils";
export type AnnouncementProps = ComponentProps<typeof Badge> & {
themed?: boolean;
};
export const Announcement = ({
variant = "outline",
themed = false,
className,
...props
}: AnnouncementProps) => (
<Badge
className={cn(
"group max-w-full gap-2 rounded-full bg-background px-3 py-0.5 font-medium shadow-sm transition-all",
"hover:shadow-md",
themed && "announcement-themed border-foreground/5",
className
)}
variant={variant}
{...props}
/>
);
export type AnnouncementTagProps = HTMLAttributes<HTMLDivElement>;
export const AnnouncementTag = ({
className,
...props
}: AnnouncementTagProps) => (
<div
className={cn(
"-ml-2.5 shrink-0 truncate rounded-full bg-foreground/5 px-2.5 py-1 text-xs",
"group-[.announcement-themed]:bg-background/60",
className
)}
{...props}
/>
);
export type AnnouncementTitleProps = HTMLAttributes<HTMLDivElement>;
export const AnnouncementTitle = ({
className,
...props
}: AnnouncementTitleProps) => (
<div
className={cn("flex items-center gap-1 truncate py-1", className)}
{...props}
/>
);