A sortable, filterable table with row selection and bulk actions.
Import it and pass your content. The props that matter most are listed next.
"use client";
// Function props (formatters, cells) need a client module; a Server Component can render this one.
import { DataTable, StatusCell, type DataColumn } from "@/components/ui/notchset/data-table";
type Run = { id: string; agent: string; status: "ok" | "fail"; cost: number };
const columns: DataColumn<Run>[] = [
{ key: "id", header: "RUN", width: "110px" },
{ key: "agent", header: "AGENT", width: "minmax(110px,1fr)", sortable: true },
{ key: "status", header: "STATUS", width: "96px", cell: (r) => <StatusCell status={r.status} /> },
{ key: "cost", header: "COST", width: "90px", align: "end", sortable: true, cell: (r) => `$${r.cost.toFixed(4)}` },
];
const runs: Run[] = [
{ id: "run_8f3a1", agent: "Planner", status: "ok", cost: 0.0021 },
{ id: "run_8f3a2", agent: "Triage", status: "fail", cost: 0.0007 },
];
export function RunsTable() {
return <DataTable columns={columns} rows={runs} defaultSort={{ key: "cost", dir: -1 }} />;
}columns–
{ key, header, width, align?, sortable?, sortValue?, cell? }[]Grid tracks and cells.
rows–
{ id }[]Every row.
visible–
(row) => booleanWhich rows pass your filters.
defaultSort–
{ key, dir }Starting sort.
selected / onSelectedChange–
string[]Selection.
footer / selectionActions–
render functionsThe footer at rest, and while rows are selected.
DataTabledata-slot="data-table"
The table.
StatusCelldata-slot="—"
OK, failed or running.
ScaleCelldata-slot="—"
A value on a small scale.
components/ui/notchset/data-table.tsx
pnpm dlx shadcn@latest add https://notchset.dev/r/data-table.jsonpnpm dlx shadcn@latest add https://notchset.dev/r/radix-nova/data-table.jsonFree, no account or key. Use the command for your project's primitives: a radix-*, new-york or default style in components.json is Radix, a base-* style is Base UI. With the @notchset registry added, @notchset/<name> picks for you.
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