noahgdev

Distribution Bar

Dashboards

About

A single stacked bar that shows how a total splits across categories, with a legend. Use it for storage by type, revenue by plan, or traffic by source when a pie chart would take too much room.

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

Code

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

Usage.tsx

import { DistributionBar } from "@/components/ui/dashboardcn-distribution-bar"

const devices = [
  { name: "Desktop", value: 61_400 },
  { name: "Mobile", value: 34_200 },
  { name: "Tablet", value: 4_100 },
  { name: "Other", value: 640 },
]

export default function DistributionBarDemo() {
  return (
    <div className="w-full max-w-lg">
      <DistributionBar segments={devices} showValues />
    </div>
  )
}

More by noahgdev

View all
  • Donut Chart

    Donut Chart

    1
  • Metric List

    Metric List

  • Sankey Chart

    Sankey Chart

  • Scatter Chart

    Scatter Chart

  • Radar Chart

    Radar Chart

  • Composed Chart

    Composed Chart

  • Bar Chart

    Bar Chart

  • Funnel Chart

    Funnel Chart

More in Dashboards

View all
  • Fernly — Project Management Dashboard with Kanban

    Fernly — Project Management Dashboard with Kanban

    659
  • Analytics Dashboard

    Analytics Dashboard

    59
  • Creator Dashboard

    Creator Dashboard

    208
  • Insights Dashboard

    Insights Dashboard

    35
  • serf dashboard

    serf dashboard

    137
  • Corbel — Sales Analytics Dashboard

    Corbel — Sales Analytics Dashboard

    293
  • Dashboard with Collapsible Sidebar

    Dashboard with Collapsible Sidebar

    2.7K
  • Business/Sales Dashboard

    Business/Sales Dashboard

    1.5K