Components
A card with two metrics side by side, each with a value, share badge, meter, and a supporting fact.
Leads overview
5421.43%
New leadsTop sourceLinkedIn
198
Returning leadsConversion rate12.8%
import { DualMetricCard } from "@/registry/dashboardcn/blocks/dual-metric-card"
export default function DualMetricCardDemo() {Installation#
pnpm dlx shadcn@latest add https://dashboardcn.com/r/dual-metric-card.jsonAlso installs card, button, dropdown-menu, tooltip from shadcn/ui if missing.
Usage#
import { DualMetricCard } from "@/components/dual-metric-card"
<DualMetricCard
title="Leads overview"
options={[
{ value: "month", label: "This month" },
{ value: "quarter", label: "This quarter" },
]}
metrics={[
{ label: "New leads", value: 54, showShare: true, meter: "bar", detail: { label: "Top source", value: "LinkedIn" } },
{ label: "Returning leads", value: 198, meter: "ticks", detail: { label: "Conversion rate", value: "12.8%" } },
]}
/>Your dashboard, your code.
Every component is copied into your project with the shadcn CLI. No package to upgrade, nothing to override.