Skip to content
peakcharts

Accessible React charts with purposeful motion.

Seventeen chart types, three styles, and a data table behind every chart. A React chart library built for keyboards, screen readers and reduced motion.

Get started
$ npm install peakcharts
Revenue by month
Revenue by monthClick a mark to pin its value; click it again to release. Keyboard: Enter or Space to pin, Escape to release. Data table below.021426384JanFebMarAprMayJunJan: 32Feb: 46Mar: 63Apr: 58May: 71Jun: 84
Click a mark to pin its value
View data
Revenue by month
LabelValue
Jan32
Feb46
Mar63
Apr58
May71
Jun84
<BarChart title="Revenue by month" data={data} variant="pixel" />

Seventeen charts, one shape of data

Most charts take a list of labels and values. Pass it in, pick a style, and every chart draws itself once.

Revenue bridge
Revenue bridgeClick a mark to pin its value; click it again to release. Keyboard: Enter or Space to pin, Escape to release. Data table below.0106212318424OpeningSalesRefundsUpsellChurnClosingOpening: 240 (balance: 240)Sales: 160 (balance: 400)Refunds: -48 (balance: 352)Upsell: 72 (balance: 424)Churn: -35 (balance: 389)Closing: 389 (balance: 389)
Click a mark to pin its value
View data
Revenue bridge
LabelValueBalance
Opening240240
Sales160400
Refunds-48352
Upsell72424
Churn-35389
Closing389389
WaterfallChart shows running balances from an opening to a closing total.
Traffic sources
Traffic sourcesClick a mark to pin its value; click it again to release. Keyboard: Enter or Space to pin, Escape to release. Data table below.Organic: 46Direct: 24Referral: 18Paid: 12100Total
Click a mark to pin its value
Organic 46Direct 24Referral 18Paid 12
View data
Traffic sources
LabelValue
Organic46
Direct24
Referral18
Paid12
DonutChart in the 3D style, with the same table behind it.
Activity
ActivityClick a mark to pin its value; click it again to release. Keyboard: Enter or Space to pin, Escape to release. Data table below.MonTueWedThuFriMorningAfternoonEveningMorning, Mon: 12Morning, Tue: 28Morning, Wed: 34Morning, Thu: 19Morning, Fri: 8Afternoon, Mon: 22Afternoon, Tue: 41Afternoon, Wed: 47Afternoon, Thu: 38Afternoon, Fri: 25Evening, Mon: 9Evening, Tue: 14Evening, Wed: 21Evening, Thu: 17Evening, Fri: 30
Click a mark to pin its value
Low 8High 47
View data
Activity
Row / ColumnValue
Morning, Mon12
Morning, Tue28
Morning, Wed34
Morning, Thu19
Morning, Fri8
Afternoon, Mon22
Afternoon, Tue41
Afternoon, Wed47
Afternoon, Thu38
Afternoon, Fri25
Evening, Mon9
Evening, Tue14
Evening, Wed21
Evening, Thu17
Evening, Fri30
HeatmapChart in the pixel style.
Weekly active users
Weekly active usersClick a mark to pin its value; click it again to release. Keyboard: Enter or Space to pin, Escape to release. Data table below.0480.3960.51.4K1.9KW1W2W3W4W5W6W7W1: 1,240W2: 1,385W3: 1,362W4: 1,604W5: 1,718W6: 1,693W7: 1,921
Click a mark to pin its value
View data
Weekly active users
LabelValue
W11,240
W21,385
W31,362
W41,604
W51,718
W61,693
W71,921
LineChart for trends.
Browse all 17 chartsLive examples, data shapes and notes for each one.
Revenue by month
Revenue by monthClick a mark to pin its value; click it again to release. Keyboard: Enter or Space to pin, Escape to release. Data table below.021426384JanFebMarAprMayJunJan: 32Feb: 46Mar: 63Apr: 58May: 71Jun: 84
Click a mark to pin its value
View data
Revenue by month
LabelValue
Jan32
Feb46
Mar63
Apr58
May71
Jun84

Read any value, then keep it

Hover or focus a mark to read it. Click to pin it while you look elsewhere. Every chart has a table with the same numbers.

Hover or focus
Shows the value.
Click, tap, Enter or Space
Pins it. Hovering other marks will not replace it.
Escape
Clears the pin.

Accessible by default

Not a layer you add later. It is how the charts are drawn.

  • Keyboard ready

    Every mark is a keyboard target with a visible focus ring.

  • Data tables

    A collapsible HTML table carries the same values as the chart.

  • Motion that stops

    Geometry draws in once. Reduced-motion preferences always win.

  • Honest errors

    Bad data shows a visible error, never a misleading chart.

  • Themeable

    Light and dark are built in. Everything else is a CSS variable.

  • Typed

    Written in TypeScript with declarations for every component.

  • Self-hosted font

    DM Sans ships in the bundle, so nothing calls Google Fonts.

  • Server rendering

    Charts render on the server and work in the App Router.

Install, import, render

$ npm install peakcharts
Revenue.tsx
import { BarChart } from 'peakcharts';
import 'peakcharts/styles.css';

export default function Revenue() {
  return (
    <BarChart
      title="Revenue by month"
      data={[
        { label: 'Jan', value: 32 },
        { label: 'Feb', value: 46 },
        { label: 'Mar', value: 63 },
      ]}
    />
  );
}

React, React DOM and Motion are peer dependencies. Requires React 18 or newer.

Revenue by month
Revenue by monthClick a mark to pin its value; click it again to release. Keyboard: Enter or Space to pin, Escape to release. Data table below.015.831.547.363JanFebMarJan: 32Feb: 46Mar: 63
Click a mark to pin its value
View data
Revenue by month
LabelValue
Jan32
Feb46
Mar63