properui

Badge

Buttons

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>
  );
}

Dependencies

More by properui

View all
  • Command Menu

    Command Menu

    13
  • Loading Indicator

    Loading Indicator

    7
  • Breadcrumbs

    Breadcrumbs

  • Toggle

    Toggle

  • Tags

    Tags

  • Progress Indicators

    Progress Indicators

  • Radio Buttons

    Radio Buttons

  • Button

    Button

More in Buttons

View all
  • Button Save

    Button Save

    46
  • Button

    Button

    20
  • Eclipse Button

    Eclipse Button

    5
  • Button

    Button

    32
  • Button

    Button

    6
  • Button

    Button

    14
  • Button Group

    Button Group

    37
  • Split Button

    Split Button

    32