A spreadsheet-style grid with editing, range selection, undo and CSV export.
Import it and pass your content. The props that matter most are listed next.
"use client";
import { DataGrid, type DataGridColumn } from "@/components/ui/notchset/data-grid";
type EvalCase = { id: string; input: string; score: number; status: string };
const columns: DataGridColumn<EvalCase>[] = [
{ key: "id", label: "CASE", width: 92 },
{ key: "input", label: "INPUT", width: 260, editable: true },
{ key: "score", label: "SCORE", width: 80, type: "number", editable: true, min: 0, max: 100 },
{ key: "status", label: "STATUS", width: 92, dot: (r) => (r.status === "PASS" ? "ink" : "signal") },
];
const cases: EvalCase[] = [
{ id: "pc-0001", input: "Summarise the migration evals", score: 91, status: "PASS" },
{ id: "pc-0002", input: "Find the cheapest model for triage", score: 72, status: "FAIL" },
];
// Stable functions: the grid rebuilds its view when they change.
const rowId = (r: EvalCase) => r.id;
const derive = (r: EvalCase) => ({ ...r, status: r.score >= 80 ? "PASS" : "FAIL" });
// Edits, undos and redos arrive here once the grid shows them: save them to your API.
export function EvalCases({ saveScore }: { saveScore: (caseId: string, score: number) => void }) {
return (
<DataGrid
columns={columns}
rows={cases}
rowId={rowId}
derive={derive}
csvName="cases.csv"
onCellChange={(change) => {
if (change.key === "score") saveScore(change.rowId, Number(change.value));
}}
/>
);
}columns–
{ key, label, width, type?, editable?, min?, max?, format?, muted?, dot? }[]Columns; the first is sticky.
rows / rowId–
T[] / (row) => stringData and identity.
query / derive / csvName–
string / (row) => row / stringSearch, recomputed fields, export name.
onCellChange–
({ rowId, key, value, previous }) => voidEvery committed edit, undo and redo: persist it here. Without it, edits stay in the grid.
DataGriddata-slot="data-grid"
The grid.
matchRowdata-slot="—"
The search rule, for a header count.
components/ui/notchset/data-grid.tsx
This component is included with Pro.
Try the live preview above. Get Pro to install the source.
pnpm dlx shadcn@latest add @notchset-pro/data-gridNeeds your registry key. Your components.json style picks the Base UI or Radix build: radix-*, new-york and default get Radix, base-* gets Base UI.
The CLI adds the styles to the CSS file named in components.json (tailwind.css). Check that it points at your global stylesheet, that the project uses Tailwind CSS v4, and that the file is imported in your root layout. Installed by hand: paste styles.css into that file.
Give your coding assistant the Markdown guide instead of screenshots.
https://notchset.dev/api/mcp (setup)v1.0.0 · 2026-10-02
First release
Pro is in early access.