ganapativs

Dumbbell Chart

Component

About

A compact SVG chart that plots a before (hollow dot) and after (filled dot) value per row joined by a connector, for comparing ranges or changes like salary bands.

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

Code

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

Usage.tsx

import { Dumbbell } from "@/components/ui/dumbbell";

export default function DumbbellDemo() {
  return (
    <div className="flex w-full items-center justify-center p-10">
      <Dumbbell
        data={[{ from: 62000, to: 84000 }]}
        title="Band move"
        style={{ width: 200, height: 28 }}
      />
    </div>
  );
}

More by ganapativs

View all
  • SparkBar

    SparkBar

  • Delta Indicator

    Delta Indicator

  • Calendar Strip

    Calendar Strip

  • Heat Strip

    Heat Strip