Componentcharts0.69 KB gzipZero dependencies

Bar Chart

Mini data bar chart with dashed guideline grids and hover zoom.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add bar-chart

Or install the full npm package:

npm install bigbullui

Usage

tsx8 lines
import { BarChart } from "@/components/ui/bar-chart"; <BarChart  data={[    { label: "A", value: 40 },    { label: "B", value: 80, tone: "accent" },  ]}/>

Source code

bar-chart.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxbar-chart.tsx77 lines
import * as React from "react";import { cn } from "./lib/utils"; export interface BarChartItem {  label: string;  value: number;  tone?: "default" | "accent";} export interface BarChartProps extends React.HTMLAttributes<HTMLDivElement> {  data: BarChartItem[];  height?: number;  showValues?: boolean;  className?: string;} export function BarChart({  data = [],

Props

Interactive Prop Playground

Tweak parsed AST props below to generate ready-to-paste JSX.

tsx3 lines
import { BarChart } from "@/components/ui/bar-chart"; <BarChart />
PropTypeDescription
dataBarChartItem[]Dataset array rendered in charts, grids, or tables. (Default: [])
heightnumberConfigures height. (Default: 160)
showValuesbooleanToggles show values. (Default: true)
classNamestringOptional Tailwind or custom CSS classes merged with component styles.