About
Two metrics side by side in one card, each with a value, a share badge, a meter, and a supporting fact. Use it when two numbers are best read together, like new and returning leads.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Dual Metric Card to your project and fits it to your theme.
Code
How Dual Metric Card is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { DualMetricCard } from "@/components/ui/dashboardcn-dual-metric-card"
export default function DualMetricCardDemo() {
return (
<DualMetricCard
className="w-full max-w-md"
title="Leads overview"
options={[
{ value: "month", label: "This month" },
{ value: "quarter", label: "This quarter" },
{ value: "year", label: "This year" },
]}
metrics={[
{
label: "New leads",
value: 54,
showShare: true,
meter: "bar",
color: "var(--color-violet-500)",
detail: { label: "Top source", value: "LinkedIn" },
},
{
label: "Returning leads",
value: 198,
meter: "ticks",
color: "var(--color-emerald-500)",
detail: {
label: "Conversion rate",
value: "12.8%",
description: "Share of returning leads that converted this period.",
},
},
]}
/>
)
}
















