noahgdev

Balance Chart Card

Dashboards

About

A balance or price card for shadcn/ui: a big value with delta, a row of supporting stats, and a line chart with a reference line and a peak marker. It suits account balances, stock prices, and any headline metric with history.

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

Code

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

Usage.tsx

import { BalanceChartCard } from "@/components/ui/dashboardcn-balance-chart-card"

const data = Array.from({ length: 24 }, (_, hour) => ({
  time: `${String(hour).padStart(2, "0")}:00`,
  balance: 22_000 + Math.round(Math.sin(hour / 3.5) * 1_800 + hour * 110 + (hour === 19 ? 900 : 0)),
}))

export default function BalanceChartCardDemo() {
  return (
    <BalanceChartCard
      className="w-full"
      title="Current balance"
      value={24_847.83}
      delta={0.127}
      deltaLabel="Last 24 hours"
      stats={[
        { label: "Today's sales", value: 1_249, delta: 0.08 },
        { label: "High", value: 25_900.08, color: "var(--color-emerald-500)" },
        { label: "Low", value: 20_850.42, color: "var(--color-red-500)" },
        { label: "Change", value: "-0.062%" },
      ]}
      data={data}
      xKey="time"
      yKey="balance"
      referenceValue={23_400}
      referenceLabel="Prev. close"
    />
  )
}

Dependencies

More by noahgdev

View all
  • Donut Chart

    Donut Chart

    5
  • Funnel Chart

    Funnel Chart

    3
  • Heatmap Chart

    Heatmap Chart

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

    700
  • Analytics Dashboard

    Analytics Dashboard

    72
  • Insights Dashboard

    Insights Dashboard

    40
  • Creator Dashboard

    Creator Dashboard

    212
  • Corbel — Sales Analytics Dashboard

    Corbel — Sales Analytics Dashboard

    363
  • serf dashboard

    serf dashboard

    140
  • Dashboard with Collapsible Sidebar

    Dashboard with Collapsible Sidebar

    2.7K
  • Halden — CRM Dashboard with Sales Pipeline

    Halden — CRM Dashboard with Sales Pipeline

    58