Get started
Installation and first grid
ProGrid is commercial software, published to a private npm registry. Add the registry to your .npmrc, install the package, then define typed columns and render.
Authenticate with the registry
@andreisaac/pro-grid is not on the public npm registry. Buy a project licence and issue a token from your account. One token installs every andreisaac package your account is licensed for. Then put this line in the project’s .npmrc — it holds no secret, so commit it:
@andreisaac:registry=https://andisaac-pro-grid.vercel.app/api/registry/Store the token once, outside the project. This writes it to your user-level npm config (~/.npmrc) and works the same on macOS, Linux and Windows:
npm config set //andisaac-pro-grid.vercel.app/api/registry/:_authToken ais_live_…Install
npm install @andreisaac/pro-gridPeer dependencies are not bundled, so you control their versions and there is exactly one copy of each:
npm install react react-dom @tanstack/react-table @tanstack/react-virtual @dnd-kit/core @dnd-kit/sortable @dnd-kit/utilities @base-ui/react lucide-react
# Optional: recharts for the chart view, react-day-picker for date filters
npm install recharts react-day-pickerImport the stylesheet once, near your app root. It ships no CSS reset, so it will not disturb your base styles:
// Once, near your app root
import "@andreisaac/pro-grid/styles.css"Set up your AI coding assistant
The package includes an agent skill: a set of instructions that tells a coding assistant how to use ProGrid correctly. It covers the setup steps, column meta, server data, persistence, editing, live updates, pivot and theming. With it installed, your assistant uses the real prop names instead of guessing them. It lives in the installed package, at node_modules/@andreisaac/pro-grid/skills/pro-grid, and always matches the version you installed.
From your project root, install it with the open skills CLI. It asks which assistants you use and puts the skill where each one looks for it:
npx skills add ./node_modules/@andreisaac/pro-grid/skills# One assistant, no prompts
npx skills add ./node_modules/@andreisaac/pro-grid/skills --agent claude-code --yesTo install it by hand, copy the pro-grid folder into your assistant’s skills folder:
| Assistant | Copy the pro-grid folder into |
|---|---|
| Claude Code | .claude/skills/ |
| Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode | .agents/skills/ |
| Windsurf | .windsurf/skills/ |
# macOS / Linux
mkdir -p .claude/skills && cp -r node_modules/@andreisaac/pro-grid/skills/pro-grid .claude/skills/
# Windows (PowerShell)
New-Item -ItemType Directory -Force .claude\skills | Out-Null; Copy-Item -Recurse -Force node_modules\@andreisaac\pro-grid\skills\pro-grid .claude\skills\If your assistant doesn’t support skills, add this to its instructions file instead (AGENTS.md, CLAUDE.md, .cursorrules, .github/copilot-instructions.md):
Before writing ProGrid code, read node_modules/@andreisaac/pro-grid/skills/pro-grid/SKILL.md
and follow it. Open the files in its references/ folder when a task needs them.Import the grid
ProGrid is a client component — render it inside a "use client" boundary. The pure helpers exported alongside it are server-safe.
"use client"
import { createColumnHelper } from "@tanstack/react-table"
import { ProGrid } from "@andreisaac/pro-grid"Define typed columns
Column metadata is where ProGrid-specific behavior lives. The example below enables a set filter and gives the numeric column the right display semantics.
type Order = {
id: string
customer: string
status: "New" | "Processing" | "Complete"
revenue: number
}
const column = createColumnHelper<Order>()
const columns = [
column.accessor("id", { header: "Order", size: 120 }),
column.accessor("customer", { header: "Customer", size: 220 }),
column.accessor("status", {
header: "Status",
meta: {
filterVariant: "set",
filterOptions: ["New", "Processing", "Complete"],
},
}),
column.accessor("revenue", {
header: "Revenue",
meta: { align: "right", valueType: "number" },
}),
]A typed first grid
Sort a header, open a column filter, resize a column, or move through the rows with the pager.
import { ProGrid, type ProColumnDef } from "@/components/pro-grid"
import { formatCurrency, operationOrders, type OperationOrder } from "@/lib/operations-data"
function StatusCell({ value }: { value: unknown }) {
const status = String(value)
return <span className={`order-status order-status--${status.toLowerCase().replaceAll(" ", "-")}`}>{status}</span>
}
const baseColumns: ProColumnDef<OperationOrder>[] = [
{ accessorKey: "id", header: "Order", size: 118, meta: { label: "Order", type: "string" } },
{ accessorKey: "customer", header: "Customer", size: 190, meta: { label: "Customer", type: "string" } },
{
accessorKey: "region",
header: "Region",
size: 145,
meta: {
label: "Region",
type: "string", filterVariant: "set",
filterOptions: ["North America", "Europe", "Asia Pacific", "Latin America"],
groupable: true,
pivotable: true,
},
},
{
accessorKey: "status",
header: "Status",
size: 120,
cell: ({ getValue }) => <StatusCell value={getValue()} />,
meta: {
label: "Status",
type: "string", filterVariant: "set",
filterOptions: ["On track", "At risk", "Delayed", "Complete"],
groupable: true,
pivotable: true,
},
},
{
accessorKey: "units",
header: "Units",
size: 88,
meta: { label: "Units", type: "number", align: "right", aggregable: true, defaultAgg: "sum" },
},
{
accessorKey: "revenue",
header: "Revenue",
size: 128,
meta: {
label: "Revenue",
type: "number",
align: "right",
aggregable: true,
defaultAgg: "sum",
formatValue: (value) => formatCurrency(Number(value)),
},
},
]
const basicDemoRows = operationOrders.slice(0, 18)
export function BasicDocsDemo() {
return (
<ProGrid<OperationOrder>
columns={baseColumns.slice(0, 5)}
data={basicDemoRows}
getRowId={(row) => row.id}
height={330}
pagination={{ pageSize: 8 }}
title="Recent orders"
/>
)
}// Every row the grid holds — 18 of the 240 sample orders,
// passed straight to `data` and keyed by `getRowId`.
/** `Cancelled` is never generated below; the billing demo marks its own. */
type OrderStatus = "On track" | "At risk" | "Delayed" | "Complete" | "Cancelled"
interface OperationOrder extends Record<string, unknown> {
id: string
customer: string
channel: "Direct" | "Marketplace" | "Partner"
region: "North America" | "Europe" | "Asia Pacific" | "Latin America"
owner: string
status: OrderStatus
priority: "Critical" | "High" | "Normal"
units: number
revenue: number
margin: number
slaHours: number
updatedAt: string
}
const rows: OperationOrder[] = [
{
"id": "ORD-10482",
"customer": "Keystone Foods",
"channel": "Direct",
"region": "North America",
"owner": "Theo Martins",
"status": "Complete",
"priority": "Normal",
"units": 18,
"revenue": 1850,
"margin": 12,
"slaHours": 2,
"updatedAt": "2026-08-01T08:00:00.000Z"
},
{
"id": "ORD-10483",
"customer": "Atlas Manufacturing",
"channel": "Partner",
"region": "North America",
"owner": "Jon Bell",
"status": "Delayed",
"priority": "Critical",
"units": 55,
"revenue": 9769,
"margin": 25,
"slaHours": 7,
"updatedAt": "2026-08-02T09:00:00.000Z"
},
// …16 more rows
]Recent orders
The minimum contract
columnsThe typed column definitions. This is the only required prop.
dataRows for client mode or the current page for controlled server mode.
getRowIdA stable key that preserves selection and expansion across reordering.