Virtualized data-grid component for Tusk. Postgres-agnostic — exposes a ColumnDef / Row shape and cell-renderer plugins, takes rows from any source.
bun add @tusk/grid
# or, when developing alongside Tusk:# "@tusk/grid": "file:../tusk-grid"import{Grid,typeColumnDef,typeRow}from'@tusk/grid';constcolumns: ColumnDef[]=[{name: 'id',typeHint: 'int4',renderer: 'numeric',isPrimaryKey: true,widthPx: 80},{name: 'name',typeHint: 'text',renderer: 'text',isPrimaryKey: false,widthPx: 200},];constrows: Row[]=[[1,'Alice'],[2,'Bob']];const{ handle, api }=Grid({
columns,
rows,onCellCommit(rowIndex,columnIndex,newValue){/* … */},});Pre-D2: placeholder widget that renders Grid: N rows × M cols. Real virtualization, column header, cell renderers, and inline edit land in milestone D2 of the Tusk plan.
MIT.