About
A small label for displaying status, categories, or metadata inline with text or UI elements.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Badge to your project and fits it to your theme.
Code
How Badge is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { Badge } from "@/components/ui/badge";
import { MdCheck, MdWarning, MdInfo, MdClose, MdStar } from "react-icons/md";
export default function IconBadgesDemo() {
return (
<div className="flex flex-wrap items-center gap-3">
<Badge variant="success" leftIcon={<MdCheck className="h-3 w-3" />}>
Completed
</Badge>
<Badge variant="warning" leftIcon={<MdWarning className="h-3 w-3" />}>
Warning
</Badge>
<Badge variant="info" leftIcon={<MdInfo className="h-3 w-3" />}>
Information
</Badge>
<Badge variant="destructive" leftIcon={<MdClose className="h-3 w-3" />}>
Failed
</Badge>
<Badge variant="normal" rightIcon={<MdStar className="h-3 w-3" />}>
Featured
</Badge>
</div>
);
}







