Headless, accessible charts for Svelte 5

@human-kit/charts gives you the difficult parts of a chart: the scales, the geometry, the keyboard operation, the focus control and the accessible names. The parts have no styles. You write the design, and no part changes it.

pnpm add @human-kit/charts
npm install @human-kit/charts
yarn add @human-kit/charts
bun add @human-kit/charts

Try it

Move the focus into the chart with the Tab key. The arrow keys move the focus over the points, and the tooltip shows the values. Enter selects a point.

Visits per month in 2025, in thousands
monthDocsBlog
January 2025128
February 2025159
March 20251411
April 20251810
May 20252212
June 20252114
July 20252513
August 20252715
September 20252617
October 20253016
November 20253318
December 20253520

Why this library

Accessibility is the primary function
A chart is one tab stop, and the arrow keys move the focus over the data. Each point has an accessible name with all of its values. The data table gives the same values as a table.
The parts have no styles
A mark draws with currentColor. Each part shows its state in data attributes: data-series, data-focused, data-focus-visible and data-selected. You write all of the CSS.
A chart is a composition of marks
You put a line, an area or bars on shared scales. Each mark can have its own data. The field names of the data are typed, thus an incorrect name is a type error.
No runtime dependency
The scales, the ticks, the paths and the stack transform are in the package. Each scale has a subpath export, and your bundler includes only the parts that you import.

Documentation

Each page has the live demos, the props table, and the list of the data attributes.

Overview

Chart

Marks

Guides

Access