Componentcharts0.76 KB gzipZero dependencies

Waterfall Chart

Floating bars showing incremental changes with connecting guides

Preview

Live Preview
Open ↗

Installation

Tokens guide →

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

npx bigbullui add waterfall-chart

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { WaterfallChart } from "@/components/ui/waterfall-chart"; <WaterfallChart items={items} />

Source code

waterfall-chart.tsx + 1 helper

Zero 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 />
PropTypeDescription
itemsWaterfallChartItem[]Structured list of items rendered by the component. (Default: [])
heightnumberConfigures height. (Default: 350)