noahgdev

Dual Metric Card

Dashboards

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.",
          },
        },
      ]}
    />
  )
}

Dependencies

More by noahgdev

View all
  • Donut Chart

    Donut Chart

    5
  • Funnel Chart

    Funnel Chart

    3
  • Heatmap Chart

    Heatmap Chart

    3
  • Segmented Meter

    Segmented Meter

    1
  • Revenue Ring Card

    Revenue Ring Card

  • Payment Summary Card

    Payment Summary Card

  • Commerce KPI Row

    Commerce KPI Row

  • Tick KPI Card

    Tick KPI Card

More in Dashboards

View all
  • Fernly — Project Management Dashboard with Kanban

    Fernly — Project Management Dashboard with Kanban

    736
  • Analytics Dashboard

    Analytics Dashboard

    80
  • Creator Dashboard

    Creator Dashboard

    215
  • Insights Dashboard

    Insights Dashboard

    43
  • Corbel — Sales Analytics Dashboard

    Corbel — Sales Analytics Dashboard

    419
  • serf dashboard

    serf dashboard

    144
  • Dashboard with Collapsible Sidebar

    Dashboard with Collapsible Sidebar

    2.7K
  • Halden — CRM Dashboard with Sales Pipeline

    Halden — CRM Dashboard with Sales Pipeline

    64