Componentcharts0.76 KB gzipZero dependencies
Waterfall Chart
Floating bars showing incremental changes with connecting guides
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add waterfall-chartOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { WaterfallChart } from "@/components/ui/waterfall-chart"; <WaterfallChart items={items} />Source code
waterfall-chart.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxwaterfall-chart.tsx131 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface WaterfallChartItem { label: string; value: number; // positive = increment, negative = decrement} export interface WaterfallChartProps extends React.HTMLAttributes<HTMLDivElement> { items: WaterfallChartItem[]; height?: number;} export function WaterfallChart({ items = [], height = 350,Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { WaterfallChart } from "@/components/ui/waterfall-chart"; <WaterfallChart />| Prop | Type | Description |
|---|---|---|
| items | WaterfallChartItem[] | Structured list of items rendered by the component. (Default: []) |
| height | number | Configures height. (Default: 350) |