About
A small colored label used to show a status, category, count, or tag next to content, with pill/rectangle/modern styles and optional dot, icon, flag, avatar, or close button.
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 { BadgeIcon, filledColors } from "@/components/ui/badges";
import { Plus } from "@untitledui/icons";
export default function BadgeWithIconOnlyDemo() {
return (
<div className="flex flex-col items-start gap-4">
{(Object.keys(filledColors) as Array<keyof typeof filledColors>).map(
(color) => (
<div key={color} className="flex items-start gap-4">
<button
aria-label="Add"
className="outline-focus-ring cursor-pointer rounded-full focus-visible:outline-2 focus-visible:outline-offset-2"
>
<BadgeIcon color={color} size="sm" icon={Plus} />
</button>
<button
aria-label="Add"
className="outline-focus-ring cursor-pointer rounded-full focus-visible:outline-2 focus-visible:outline-offset-2"
>
<BadgeIcon color={color} size="md" icon={Plus} />
</button>
<button
aria-label="Add"
className="outline-focus-ring cursor-pointer rounded-full focus-visible:outline-2 focus-visible:outline-offset-2"
>
<BadgeIcon color={color} size="lg" icon={Plus} />
</button>
</div>
),
)}
</div>
);
}















