Records as a spreadsheet, edited from the keyboard.
Every shadcn style · one file
v2.1 · Updated Oct 21pnpm dlx shadcn@latest add @notchset-pro/sheet-gridpnpm dlx shadcn@latest add @notchset-pro/sheet-gridNeeds your registry key. Every components.json style gets the same files.
Works with React 18.3 or 19 on Tailwind CSS v4, in any shadcn project. What's tested
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.
Import it and pass your content. The props that matter most are listed next.
"use client";
import * as React from "react";
import { SheetGrid, type SheetColumn } from "@/components/ui/notchset/blocks/sheet-grid";
import { StatusGlyph, type TaskStatus } from "@/components/ui/notchset/status-glyph";
type Row = { id: string; title: string; status: TaskStatus; owner: string; due: string; size: string; children?: number; expanded?: boolean; depth?: number };
const START: Row[] = [
{ id: "RP-58", title: "Batch-optimise 40+ stops in under two seconds", status: "doing", owner: "Maya", due: "Thu", size: "L", children: 2 },
{ id: "RP-60", title: "Explain why a stop moved", status: "todo", owner: "Ruth", due: "Oct 27", size: "M" },
{ id: "RP-61", title: "Dispatcher override reason picker", status: "todo", owner: "Ines", due: "Oct 28", size: "S" },
{ id: "RP-50", title: "Snap stops to the road network", status: "review", owner: "Tomás", due: "Thu", size: "M" },
];
const NEXT: Record<TaskStatus, TaskStatus> = { backlog: "todo", todo: "doing", doing: "review", review: "done", done: "todo", cancelled: "todo" };
const WORD: Record<TaskStatus, string> = { backlog: "Backlog", todo: "To do", doing: "In progress", review: "In review", done: "Done", cancelled: "Cancelled" };
export default function SheetGridDemo() {
const [rows, setRows] = React.useState(START);
const [widths, setWidths] = React.useState<Record<string, number>>({ title: 300, status: 130, owner: 110, due: 96, size: 70 });
const [sort, setSort] = React.useState<"asc" | null>(null);
const set = (id: string, p: Partial<Row>) => setRows((rs) => rs.map((r) => (r.id === id ? { ...r, ...p } : r)));
const sub = ({ children: _c, expanded: _e, ...r }: Row, n: number, title: string): Row => ({ ...r, id: `${r.id}#${n}`, title, depth: 1 });
const shown = (sort ? [...rows].sort((a, b) => a.title.localeCompare(b.title)) : rows).flatMap((r) => [r, ...(r.expanded ? [sub(r, 1, "Cache the distance matrix per day"), sub(r, 2, "Budget test: under 2s on CI")] : [])]);
const columns: SheetColumn<Row>[] = [
{ key: "title", label: "Task", width: widths.title!, min: 180, text: (r) => r.title, onCommit: (r, v) => set(r.id, { title: v }), sort, onSort: () => setSort(sort ? null : "asc"), cell: (r) => <span className="truncate">{r.title}</span> },
{ key: "status", label: "Status", width: widths.status!, cell: (r) => (r.depth ? null : <button type="button" tabIndex={-1} onClick={() => set(r.id, { status: NEXT[r.status] })} className="flex cursor-pointer items-center gap-1.5"><StatusGlyph status={r.status} label={r.title} />{WORD[r.status]}</button>) },
{ key: "owner", label: "Owner", width: widths.owner!, text: (r) => r.owner, onCommit: (r, v) => set(r.id, { owner: v }), cell: (r) => r.owner },
{ key: "due", label: "Due", width: widths.due!, cell: (r) => r.due },
{ key: "size", label: "Size", width: widths.size!, align: "end", cell: (r) => r.size },
];
return (
<div className="flex w-full max-w-[760px] flex-col gap-2">
<SheetGrid<Row> label="Tasks as a table" rows={shown} columns={columns} onToggle={(r) => set(r.id, { expanded: !r.expanded })} onResize={(k, w) => setWidths((x) => ({ ...x, [k]: w }))} className="max-h-[300px] rounded-[var(--ns-radius-lg)] shadow-[0_0_0_1px_var(--ns-line)]" />
<span className="text-[length:var(--ns-text-meta)] text-[var(--ns-ink-3)]">Click a cell, then arrows, Enter to edit, Esc to put it back; Enter on Status cycles it.</span>
</div>
);
}This example also uses Status glyph. This command installs them with it, so the example pastes as it is:
pnpm dlx shadcn@latest add @notchset-pro/sheet-grid @notchset/status-glyphcomponents/ui/notchset/blocks/sheet-grid.tsx
This component is included with Pro.
Try the live preview above. Get Pro to install the source.
label–
stringRequired.
rows–
R[]Required.
columns–
SheetColumn<R>[]Required.
onOpen–
(row: R) => voidonToggle–
(row: R) => voidonResize–
(key: string, width: number) => voidgroups[]
{ before: string; label: React.ReactNode }[]group headings between rows: the row id a heading comes before, and what it says
active–
string | nullthe row the app marks as the one open beside it
empty–
React.ReactNodeGive your coding assistant the Markdown guide instead of screenshots.
https://notchset.dev/api/mcp (setup)v2.1.0 · 2026-10-21
New: a spreadsheet-like grid with keyboard editing and column widths.
v2.0.0 · 2026-10-13
Released with the Notchset system.
The same file, at work in a finished app. Open it live and find it on its pages.
Pro is in early access.