Introduction
Quartile is an open-source React toolkit of charts, tables and controls that share one theme, one data model and one selection state.
Status: 0.1 preview
@quartile/react is not on npm yet and the API may change before 0.1.0 is released. Licensed Apache-2.0.Chart libraries stop at the chart and UI kits stop at the form, so teams theme the two separately and pass filter state between them by hand. Quartile ships both layers as one system:
- One theme. Charts, tables, inputs and overlays read the same
--q-*CSS custom properties. Light, dark and a compact density are token remaps. No Tailwind or CSS-in-JS runtime is required. - One data model. Pass rows and name the fields. Types, labels and formats are inferred, or declared once with
dataset(), and every axis, tooltip, table and KPI uses them. - One selection. Wrap views in
<Selection>. Brushes, clicks and filter chips publish predicates; every other view re-filters, and a view is never filtered by its own selection. - Accessible charts by default. Charts have a keyboard model, an auto-written summary and a table fallback.
- Machine-readable. A JSON Schema describes the charts, KPI, DataTable and FilterBar, so generated dashboard specs can be validated before they render.
See it work
Drag across the daily bars to brush a date range, or click a region. The KPI, the chart and the list follow; the view you are using keeps showing everything, so you can change your selection.
Revenue per day of Date, Sep 7 to Oct 6: total $383,658.96. Highest: Sep 23 ($15,310.22).
| Date | Revenue |
|---|---|
| Sep 7 | $10,351.36 |
| Sep 8 | $11,382.74 |
| Sep 9 | $12,681.26 |
| Sep 10 | $11,817.67 |
| Sep 11 | $12,131.45 |
| Sep 12 | $9,551.33 |
| Sep 13 | $10,160.03 |
| Sep 14 | $12,586.99 |
| Sep 15 | $12,098.52 |
| Sep 16 | $13,253.70 |
| Sep 17 | $12,248.66 |
| Sep 18 | $15,193.38 |
| Sep 19 | $11,383.75 |
| Sep 20 | $10,556.65 |
| Sep 21 | $13,912.14 |
| Sep 22 | $14,638.15 |
| Sep 23 | $15,310.22 |
| Sep 24 | $14,331.12 |
| Sep 25 | $14,904.38 |
| Sep 26 | $13,249.96 |
| Sep 27 | $11,743.45 |
| Sep 28 | $12,505.08 |
| Sep 29 | $13,760.55 |
| Sep 30 | $15,036.34 |
| Oct 1 | $12,636.15 |
| Oct 2 | $13,479.01 |
| Oct 3 | $13,249.25 |
| Oct 4 | $10,684.70 |
| Oct 5 | $15,016.97 |
| Oct 6 | $13,804.00 |
Revenue by region, 5 items. Highest North America at $159,989.49; lowest Middle East & Africa at $19,081.77.
| Region | Revenue |
|---|---|
| North America | $159,989.49 |
| Europe | $104,024.63 |
| Asia Pacific | $68,740.42 |
| Latin America | $31,822.65 |
| Middle East & Africa | $19,081.77 |
import { BarList, KPI, Histogram, Selection } from '@quartile/react';
type Order = { date: string; region: string; amount: number };
export function RevenueExplorer({ orders }: { orders: Order[] }) {
return (
<Selection>
<Histogram data={orders} x="date" value="amount" interval="day" brush aria-label="Revenue per day" />
<KPI label="Revenue" data={orders} value="amount" format="currency-compact" trendBy="date" />
<BarList data={orders} category="region" value="amount" select />
</Selection>
);
}What is included
| Layer | Exports |
|---|---|
| Charts | AreaChart, BarChart, BarList, BoxPlot, CalendarHeatmap, DonutChart, Funnel, Heatmap, Histogram, LineChart, Sankey, ScatterPlot, Sparkline. SVG by default; ScatterPlot also supports Canvas and WebGL. |
| Interface components | Buttons, inputs, date range picker, navigation, menus, command menu, dialogs, toasts, tooltips, popovers, cards, badges. |
| Data display | KPI and KPIGroup, FilterBar, DataTable and DataExplorer: metrics, exact records and controlled exploration. |
| Selection | Selection, useSelection, useLinkedRows and the predicate helpers. |
| Spec layer | quartileSchema, validateSpec and SpecView for JSON specs. |
| Optional assistance | Bounded profiles and context, model adapter protocol, validated proposals and explicit review/apply. |
| Scientific examples | Dataset exploration, exact cohort retention, model evaluation and dataframe handoff. |
How it compares
Quartile focuses on composing a data application: charts, tables and controls share a theme, field metadata and a selection store. Evaluate it against the integration work your report needs, as well as chart coverage, accessibility and performance. Mature charting and grid libraries remain useful choices when their capabilities match your application. Quartile is currently an early preview.
Quartile is meant to sit alongside a UI kit such as shadcn/ui rather than replace it: keep it for forms and navigation and use Quartile for the analytic surface. The full comparison, with sources and caveats, is in the landscape research note.
What is not built yet
- npm release. Install from a clone for now; see Installation.
- Coverage. Canvas/WebGL currently cover ScatterPlot only. The optional Arrow/DuckDB query layer is experimental; generated specs still use synchronous datasets.
- Scale. The worker explorer exposes bounded query and render measurements. No universal supported row count is promised.
- Screen-reader testing. The keyboard model, summaries and tables exist, but they have not been tested with NVDA, JAWS or VoiceOver yet.