shadimage
Beste UI Components
componentbadge15source: ok · hit

Stat Badge

A stat badge with an icon, bold value, and label for quick hero metrics.

npx shadcn add "https://ui.beste.co/component/r/badge15.json"
free

No selection tags yet — empty means no evidence, not lack of support.

Dependencies

Bundle weight · light
clsxtailwind-mergelucide-react

Files1 · source cached 10/9/2026, 9:30:05 PM

registry-components/badge15/badge15.tsx
import { type LucideIcon, Users } from "lucide-react";
import { cn } from "@/lib/utils";

type Tone = "primary" | "foreground" | "muted";

interface Badge15Props {
  /** The stat value (e.g. "12k+") */
  value: string;
  /** Muted label after the value (e.g. "active users") */
  label?: string;
  /** Optional leading icon (defaults to Users) */
  icon?: LucideIcon;
  /** Icon color */
  tone?: Tone;
  /** Additional classes merged onto the root */
  className?: string;
}

const toneStyles: Record<Tone, string> = {
  primary: "text-primary",
  foreground: "text-foreground",
  muted: "text-muted-foreground",
};

export const badge15Demo: Badge15Props = {
  value: "12k+",
  label: "active users",
};

/** A compact stat chip: icon, bold value, muted label, quick hero metrics. */
export function Badge15({
  value,
  label,
  icon: Icon = Users,
  tone = "primary",
  className,
}: Badge15Props) {
  return (
    <span
      className={cn(
        "inline-flex w-fit items-center gap-2 rounded-lg border bg-background px-4 py-2",
        className
      )}
    >
      <Icon aria-hidden="true" className={cn("size-5 shrink-0", toneStyles[tone])} />
      <span className="text-2xl font-bold tracking-tight text-foreground">{value}</span>
      {label && <span className="text-sm text-muted-foreground">{label}</span>}
    </span>
  );
}

More from Beste UI Components

Browse all components in this library →