announcement
kibo-ui-registry/announcementFreeComponent
A compound badge designed to display an announcement.
Live preview
live · rendered by the registry
Rendered by Kibo UI Registry on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://www.kibo-ui.com/r/announcement.jsonSource
1import type { ComponentProps, HTMLAttributes } from "react";2import { Badge } from "@/components/ui/badge";3import { cn } from "@/lib/utils";45export type AnnouncementProps = ComponentProps<typeof Badge> & {6 themed?: boolean;7};89export const Announcement = ({10 variant = "outline",11 themed = false,12 className,13 ...props14}: AnnouncementProps) => (15 <Badge16 className={cn(17 "group max-w-full gap-2 rounded-full bg-background px-3 py-0.5 font-medium shadow-sm transition-all",18 "hover:shadow-md",19 themed && "announcement-themed border-foreground/5",20 className21 )}22 variant={variant}23 {...props}24 />25);2627export type AnnouncementTagProps = HTMLAttributes<HTMLDivElement>;2829export const AnnouncementTag = ({30 className,31 ...props32}: AnnouncementTagProps) => (33 <div34 className={cn(35 "-ml-2.5 shrink-0 truncate rounded-full bg-foreground/5 px-2.5 py-1 text-xs",36 "group-[.announcement-themed]:bg-background/60",37 className38 )}39 {...props}40 />41);4243export type AnnouncementTitleProps = HTMLAttributes<HTMLDivElement>;4445export const AnnouncementTitle = ({46 className,47 ...props48}: AnnouncementTitleProps) => (49 <div50 className={cn("flex items-center gap-1 truncate py-1", className)}51 {...props}52 />53);
What it pulls in
Other registry items
Files it writes
More from Kibo UI Registry
All 41 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| avatar-stackavatar-stack | Kibo UI Registry | Components | Free | no deps | |
| bannerbanner | Kibo UI Registry | Components | Free | 2 deps | |
| calendarcalendar | Kibo UI Registry | Components | Free | 3 deps | |
| choiceboxchoicebox | Kibo UI Registry | Components | Free | 2 deps | |
| code-blockcode-block | Kibo UI Registry | Components | Free | 5 deps · 2 files | |
| color-pickercolor-picker | Kibo UI Registry | Components | Free | 3 deps | |
| comboboxcombobox | Kibo UI Registry | Components | Free | 2 deps | |
| comparisoncomparison | Kibo UI Registry | Components | Free | 2 deps |
