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

@reactloom/data-grid

v1.3.0

Published

Accessible React data grid, pivot table and spreadsheet for ReactLoom: keyboard navigation, sorting, filtering, pagination, selection, column resizing, server-side data and row virtualization.

Readme

@reactloom/data-grid

An accessible data grid for ReactLoom: role="grid" keyboard navigation, sorting, search, pagination, row selection, cell editing, grouping with totals, CSV export, resizable and hideable columns, and row virtualization.

pnpm add @reactloom/data-grid @reactloom/ui @reactloom/theme
import '@reactloom/data-grid/styles.css';
import { DataGrid } from '@reactloom/data-grid';

<DataGrid
  aria-label="Invoices"
  columns={[{ key: 'customer', header: 'Customer', sortable: true }, { key: 'amount', header: 'Amount', align: 'end' }]}
  rows={invoices}
  getRowId={(r) => r.id}
  pageSize={25}
/>;
  • Editing: editable, editor: 'text' | 'number' | 'select' | custom, validate; Enter, F2 or typing starts, Enter saves, Escape cancels. onCellEdit may return a promise.
  • Grouping: groupBy="status" with aggregate: 'sum' | 'avg' | 'min' | 'max' | 'count'.
  • Multi-sort: supply defaultSorts or controlled sorts and onSortsChange. Put the primary sort first. Shift + click or Shift + Enter/Space updates a column without clearing the others.
  • Column filters: pass filters or defaultFilters with typed text, number, date, boolean or empty rules. Every rule must match. Date rules use epoch milliseconds against Date values. Use apiRef.current.setFilters([]) to clear an uncontrolled grid. Set manualFiltering and manualSorting when your server owns the query, and pass the server’s total with manual pagination.
  • Export: apiRef.current.downloadCsv('orders.csv') saves the filtered, sorted view; toCsv(columns, rows) works anywhere. Formula-like text is neutralised (CSV injection).

Built on TanStack Table and TanStack Virtual; the public API is ReactLoom's own. For simple, read-only data use Table from @reactloom/ui instead.

Column layouts and Excel export

Pass columnLayout or defaultColumnLayout with ordered keys and logical pinnedStart / pinnedEnd groups. Enable reorderableColumns to move a header within its group with Alt + Shift + an arrow key. Save a layout in your app using getColumnLayout() and restore it with setColumnLayout(layout).

For a full saved view, use getView() and restoreView(view) on the grid API. The versioned snapshot includes the layout, widths, visibility, filters, search, sorts, and grouping. Store it in your application and pass change handlers for controlled settings you want to restore.

Load toXlsx or downloadXlsx from @reactloom/data-grid/xlsx when export is requested. Pass getExportColumns() and getRows(scope) to export the visible columns in display order. The single worksheet uses typed numbers and booleans, ISO text for dates, and literal text for strings.

Server data source

Import useDataGridDataSource from @reactloom/data-grid/server. It loads the active offset and limit with your search, column filters, and sort priorities. Pass its rows, rowCount, and loading to a grid using manual sorting, filtering, and pagination. Keep the loader identity stable and forward its signal to fetch. Use refresh() to clear cached ranges and reload the active page.

Documentation and live examples: https://www.reactloom.dev/components/data-grid · https://www.reactloom.dev/components/pivot-table · https://www.reactloom.dev/components/spreadsheet