Charts
AreaChart
Filled area chart with gradient โ ideal for visualising trends over time.
Quick Preview
Installation
npm install recharts
// Copy component fromsrc/components/charts/AreaChart.tsx
Usage
import AreaChart from '@/components/charts/AreaChart'const data = [{ month: 'Jan', revenue: 4200 },{ month: 'Feb', revenue: 5800 },]<AreaChartdata={data}xKey="month"series={[{ key: 'revenue', label: 'Revenue ($)', color: '#F45A5A' }]}height={280}showGridshowLegend/>
Examples
Multi-Series with Legend
Minimal (No Grid)
Prompt Preview
Copy a prompt that recreates this UI
Paste this into your AI coding assistant to generate code that closely matches the reference, including color, size, shape, typography, spacing, and polish.
Copy-ready AI prompt
Starts from the current visual reference and project constraints.
Tweak only product-specific copy or data after the first generation pass.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
data* | DataPoint[] | - | Array of data objects |
series* | AreaSeries[] | - | Series definitions (key, label, color) |
xKey* | string | - | Key to use for the x-axis |
height | number | 300 | Chart height in px |
showGrid | boolean | true | Show cartesian grid |
showLegend | boolean | false | Show series legend |