noahgdev

Distribution Card

Dashboards

About

A total with delta, a stacked bar showing how it splits, and a ranked list of the contributors with their values. Use it for capital inflows, revenue by source, or storage by type.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Distribution Card to your project and fits it to your theme.

Code

How Distribution Card is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client"

import * as React from "react"
import { Gem, Hexagon, Triangle } from "lucide-react"

import { DistributionCard } from "@/components/ui/dashboardcn-distribution-card"

const funds = [
  { name: "WaveMark Capital", value: 7_928_400, icon: <Gem className="text-teal-500" />, color: "var(--color-teal-500)" },
  { name: "Envato Finances", value: 3_214_900, icon: <Hexagon className="text-amber-500" />, color: "var(--color-amber-500)" },
  { name: "QBridge Tech", value: 1_246_300, icon: <Triangle className="text-orange-500" />, color: "var(--color-orange-500)" },
  { name: "Northline Partners", value: 612_000, icon: <Gem className="text-sky-500" />, color: "var(--color-sky-500)" },
  { name: "Halyard Ventures", value: 388_500, icon: <Hexagon className="text-violet-500" />, color: "var(--color-violet-500)" },
]

export default function DistributionCardDemo() {
  const [limit, setLimit] = React.useState("3")
  return (
    <DistributionCard
      className="w-full max-w-md"
      title="Capital inflows"
      items={funds.slice(0, Number(limit))}
      total={12_400_000}
      delta={390_000}
      valueLabel="Capital in"
      options={[
        { value: "3", label: "Top 3 funds" },
        { value: "5", label: "Top 5 funds" },
      ]}
      value={limit}
      onValueChange={setLimit}
    />
  )
}

Dependencies

More by noahgdev

View all
  • Donut Chart

    Donut Chart

    5
  • Funnel Chart

    Funnel Chart

    3
  • Heatmap Chart

    Heatmap Chart

    3
  • Sankey Chart

    Sankey Chart

    1
  • Segmented Meter

    Segmented Meter

    1
  • Revenue Ring Card

    Revenue Ring Card

  • Payment Summary Card

    Payment Summary Card

  • Commerce KPI Row

    Commerce KPI Row

More in Dashboards

View all
  • Fernly — Project Management Dashboard with Kanban

    Fernly — Project Management Dashboard with Kanban

    751
  • Analytics Dashboard

    Analytics Dashboard

    81
  • Creator Dashboard

    Creator Dashboard

    216
  • Insights Dashboard

    Insights Dashboard

    44
  • Corbel — Sales Analytics Dashboard

    Corbel — Sales Analytics Dashboard

    446
  • 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

    65