This component no longer exists. It was in neobrutal-ui’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-06 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.
Badge
neobrutal-ui/badgeRemovedComponent
neobrutal-ui publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by neobrutal-ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://neobrutal-ui.andongmin.com/r/badge.jsonSource
1import { cva, type VariantProps } from "class-variance-authority";2import * as React from "react";34import { cn } from "@/lib/utils";56const badgeVariants = cva(7 "inline-flex items-center justify-center rounded-base border-2 border-border px-2.5 py-0.5 text-xs font-base w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] overflow-hidden",8 {9 variants: {10 variant: {11 default: "bg-main text-main-foreground",12 neutral: "bg-secondary-background text-foreground",13 },14 },15 defaultVariants: {16 variant: "default",17 },18 },19);2021function Badge({22 className,23 variant,24 asChild = false,25 render,26 children,27 ...props28}: React.ComponentProps<"span"> &29 VariantProps<typeof badgeVariants> & {30 asChild?: boolean;31 render?: React.ReactElement;32 }) {33 const child = asChild34 ? (React.Children.toArray(children).find(React.isValidElement) as React.ReactElement)35 : render;36 const badgeClassName = cn(badgeVariants({ variant }), className);3738 if (React.isValidElement(child)) {39 const childElement = child as React.ReactElement<Record<string, unknown>>;4041 return React.cloneElement(childElement, {42 ...props,43 ...childElement.props,44 "data-slot": "badge",45 className: cn(badgeClassName, childElement.props.className as string),46 });47 }4849 return (50 <span data-slot="badge" className={badgeClassName} {...props}>51 {children}52 </span>53 );54}5556export { Badge, badgeVariants };
