Componentcharts0.93 KB gzipZero dependencies

Area Chart

Filled area chart with gradient fills and hover highlights

Preview

Live Preview
Open ↗

Installation

Tokens guide →

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

npx bigbullui add area-chart

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { AreaChart } from "@/components/ui/area-chart"; <AreaChart series={series} labels={labels} />

Source code

area-chart.tsx + 1 helper

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

tsxarea-chart.tsx139 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface AreaChartDataItem {  id: string;  label: string;  color?: string;  data: number[];} export interface AreaChartProps extends React.HTMLAttributes<HTMLDivElement> {  series: AreaChartDataItem[];  labels?: string[];  height?: number;} 

Props

Interactive Prop Playground

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

tsx3 lines
import { AreaChart } from "@/components/ui/area-chart"; <AreaChart />
PropTypeDescription
seriesAreaChartDataItem[]Configures series. (Default: [])
labelsstring[]Configures labels.
heightnumberConfigures height. (Default: 300)