Mahmoud Ilyan

Badge

Component 2

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";

export default function BadgeVariantsDemo() {
  return (
    <div className="flex flex-wrap items-center gap-2">
      <Badge variant="normal">Default</Badge>
      <Badge variant="success">Success</Badge>
      <Badge variant="warning">Warning</Badge>
      <Badge variant="info">Info</Badge>
      <Badge variant="destructive">Destructive</Badge>
    </div>
  );
}

Dependencies

More by Mahmoud Ilyan

View all
  • Steps

    Steps

    5
  • Chart

    Chart

    3
  • Card

    Card

    2
  • Radio Card

    Radio Card

    1
  • Switch

    Switch

    1
  • Checkbox Card

    Checkbox Card

    1
  • Input

    Input

    1
  • Textarea

    Textarea