npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@matthewhsu1/datagrid

v0.2.0

Published

A virtualised, server-paged data grid engine for React — windowed paging, a page cache, optimistic edits, cross-client row sync, grouping, and typed cell editors, over glide-data-grid.

Readme

@matthewhsu1/datagrid

A virtualised, server-paged data grid engine for React, built over glide-data-grid.

It is the parts a spreadsheet-shaped page needs and a renderer does not give you: a windowed page loader, a row cache that evicts, optimistic edits with rollback, cross-client row sync, grouping with collapse, sorting, persisted column layout, and typed cell editors — all against a server that holds far more rows than the browser ever will.

Status: 0.x. The API will break between minor versions. It is pinned to a pre-release build of glide-data-grid (6.0.4-alpha24); that pin loosens when glide 6 ships stable.

What it looks like

All three clips are the demo in this repo: 100,000 synthetic rows behind a Mock Service Worker.

Scrolling

Pages load into the window as it moves, and evict behind it. The row count is the server's, not the browser's.

Scrolling through 100,000 server-paged rows

Grouping and sorting

A collapse tells the server to leave those rows out, so the total changes with it. The old rows stay on screen while the new view loads behind them.

Grouping rows and sorting a column

Editing

An edit shows immediately and is sent behind it. A rejection rolls the cell back and says why.

Editing a cell with optimistic update and rollback

Install

npm i @matthewhsu1/datagrid

It expects these to already be in your app:

npm i react react-dom react-redux @reduxjs/toolkit @tanstack/react-query \
      @radix-ui/themes @glideapps/[email protected]

Quick start

Full detail — every option, its default, and the traps — is in docs/examples/configuration.md. This is the shortest path that works.

// 1. Styles, once at your entry point.
import "@matthewhsu1/datagrid/radix-styles";
import "@matthewhsu1/datagrid/datagrid.css";

// 2. Point the grid at your accent, once, before the first grid renders.
configureGridTheme({ accentColor: "grass", grayColor: "slate" });

// 3. Describe one grid.
const orderGrid = createGridInstance(
  {
    name: "orders",
    rowKey: (row) => row.id,
    columns: { defs: COLUMN_DEFS, defaultOrder: DEFAULT_ORDER },
    cells: orderCells,
    api: { fetchRows, fetchCount, fetchRow, updateRow },
  },
  { startListening: listenerMiddleware.startListening },
);

// 4. Mount its reducer under the descriptor's name, then render.
//    <DataGrid instance={orderGrid} />

The grid needs a Redux store, your listener middleware, and a QueryClientProvider above it. It creates its own <div id="portal"> if your page has none — without one, no cell can be edited and nothing says so.

Run the demo

npm install
npm run dev

100,000 synthetic rows served by a Mock Service Worker, with every cell type, grouping, sorting, editing, and a control bar for latency and failure rates. The demo consumes the package by name, aliased to source — so if the public surface is not enough to build an app, the demo stops building.

What is public

Only what src/index.ts re-exports, plus @matthewhsu1/datagrid/testing. Deep imports are blocked by exports, deliberately: everything else is free to move in a patch release. Every public symbol is documented in docs/examples/configuration.md.

Vocabulary

CONTEXT.md defines every term this codebase uses — hold, span, display model, data generation, and the rest. Read it before changing anything in src/features/dataGrid/.

Develop

npm test           # 615 tests
npm run typecheck
npm run check:docs # typechecks every code block in docs/
npm run lint
npm run build      # dist/ — JS, .d.ts, and datagrid.css

just check runs all five in one go.

Licence

MIT