kevingirelli

Bar Chart

Dashboards 16

About

An accessible SVG bar chart for one data series that renders vertical or horizontal bars with a hover/focus tooltip and full keyboard navigation.

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

Code

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

Usage.tsx

import BarChart from "@/components/ui/bar-chart";

export default function BarChartDemo() {
  return (
    <div className="flex w-full items-center justify-center p-10">
      <div className="w-full max-w-xl rounded-lg border bg-background p-6 md:p-10">
        <BarChart
          name="Visitors"
          data={[120, 180, 150, 240, 220, 300]}
          labels={["Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]}
        />
      </div>
    </div>
  );
}

More by kevingirelli

View all
  • QR Code

    QR Code

    126
  • Aurora

    Aurora

    119
  • FAQ Section

    FAQ Section

    76
  • Animated Border

    Animated Border

    71
  • Warp Gradient

    Warp Gradient

    60
  • Corner Frame

    Corner Frame

    58
  • Wave Text

    Wave Text

    53
  • Spotlight

    Spotlight

    42

More in Dashboards

View all
  • Dashboard with Collapsible Sidebar

    Dashboard with Collapsible Sidebar

    2.6K
  • Sidebar

    Sidebar

    384
  • Stat Card

    Stat Card

    30
  • Fitness Bento Grid

    Fitness Bento Grid

    33
  • SaaS Template

    SaaS Template

    2.7K
  • Stats Bento

    Stats Bento

    1.2K
  • Course Design Cards

    Course Design Cards

    1.3K
  • Data Grid Table

    Data Grid Table

    16