Area Chart
area-chartA line or area chart in plain SVG with no chart library. A crosshair snaps to the nearest point and lists every series, arrow keys walk it, round tick values, a legend from two series up, and a hidden table so screen readers get the numbers.
import { AreaChart } from "@/components/forme/area-chart/area-chart";
const traffic = [
{ month: "Jan", visitors: 4200, signups: 820 },
{ month: "Feb", visitors: 5100, signups: 960 },
{ month: "Mar", visitors: 4800, signups: 1120 },
{ month: "Apr", visitors: 6900, signups: 1480 },
{ month: "May", visitors: 7400, signups: 1390 },
{ month: "Jun", visitors: 8800, signups: 1920 },
{ month: "Jul", visitors: 8200, signups: 2210 },
{ month: "Aug", visitors: 10400, signups: 2480 },
{ month: "Sep", visitors: 11900, signups: 2950 },
];
export function AreaChartDemo() {
return (
<div className="w-full rounded-xl border border-border bg-card p-5 shadow-xs">
<p className="text-caption-1-medium text-muted-foreground">Traffic, 2026</p>
<p className="mt-1 text-[1.75rem] leading-none font-semibold tracking-[-0.03em]">11,900</p>
<AreaChart
className="mt-5"
label="Monthly visitors and signups, January to September 2026"
data={traffic}
index="month"
series={[
{ key: "visitors", label: "Visitors" },
{ key: "signups", label: "Signups" },
]}
/>
</div>
);
}Install
Adds the component, its registry dependencies, and the token stylesheet you import once.
API reference
Read from the source, so it is the API of the file you install. A prop marked * is required.
AreaChart
A line or area chart in plain SVG, sized to its container.
| Prop | Type | Default | Description |
|---|---|---|---|
data* | readonly Row[] | — | |
index* | keyof Row & string | — | The field that labels the x axis: a date, a month, a version. |
series* | readonly ChartSeries<Row>[] | — | Up to eight. Colours are assigned from --chart-1 onward, in this order. |
label* | string | — | Accessible name, and the caption of the table view. |
variant | "area" | "line" | "area" | area puts a 10% wash under each line; line is the line alone. |
height | number | 240 | |
formatValue | (value: number) => string | (value) => value.toLocaleString("en-US") | |
className | string | — |
Related


Line Chart
One or more series over an ordered axis on TanStack Charts, as smooth lines or as areas that fade to their baseline. A dashed cursor snaps to the nearest x from anywhere in the plot, the tooltip lists every series there, and areas can stack.
data display

Bar Chart
A single or grouped column chart in plain SVG. Columns are capped at 24px with rounded tops and 2px gaps, the hovered category lifts while the rest recede, arrow keys read each category, and a hidden table carries every value.
data display

Chart
The tooltip and legend every Forme chart shares: a floating panel with a colour, a name and a right-aligned value per series, and a row of swatches. Installed with any chart; use them directly to give a chart of your own the same finish.
data display