@cartis/react
v0.1.1
Published
React bindings, headless primitives, and an opt-in styled DataGrid for @cartis/core.
Readme
@cartis/react
React bindings, headless primitives, and an opt-in styled DataGrid for
@cartis/core. The only dependency is
the core engine; React 18+ is a peer.
pnpm add @cartis/react @cartis/core react react-domimport { DataGrid, type ReactColumnDef } from "@cartis/react";
import "@cartis/react/styles.css";
<DataGrid data={rows} columns={cols} pageSize={10} selectable searchable filterable />;Subpath entries (tree-shakeable)
| Import | Contents |
| -------------------------- | ---------------------------------------------------------------------------------------- |
| @cartis/react | useTable, DataGrid, headless primitives, virtual hooks, re-exported core |
| @cartis/react/headless | Table/THead/TBody/TR/TH/TD (no CSS) |
| @cartis/react/datagrid | DataGrid + building blocks |
| @cartis/react/charts | SVG/Canvas charts: Line/Area/Bar/Candlestick/Scatter/Pie/Heatmap/Combo, Sparkline, Brush |
| @cartis/react/virtual | useVirtualRows, useColumnVirtualizer |
| @cartis/react/styles.css | design-token stylesheet (light + dark) |
Headless
import { useTable } from "@cartis/react";
const table = useTable({ data, columns, pageSize: 25 });
table.getPageRows();The components are client components — see the SSR/RSC guide if you use Next.js App Router.
Full docs: see the repository docs/ — getting started, headless usage,
DataGrid recipes, charts, high-frequency updates, theming, SSR, and the API
reference.
Pre-1.0 (
v0.1.0), published under the@cartisscope.
