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

@lattice-grid-lib/core

v1.0.4

Published

A high-performance, fully-customisable React data grid with row & column virtualisation, column grouping, pinning, resizing, reordering, and theming.

Readme

@lattice-grid-lib/core

A high-performance, fully-customisable React data grid with row & column virtualisation.

npm version TypeScript React License: MIT

Features

| Feature | Details | |---|---| | Row virtualisation | Renders only visible rows — handles 100k+ rows at 60fps | | Column virtualisation | Renders only visible columns — handles wide tables with ease | | Column grouping | Multi-level headers with group spans | | Column pinning | Freeze columns to left or right | | Column resizing | Drag the resize handle; respects min/max width | | Drag reorder | HTML5 drag-and-drop column reordering | | Show / hide columns | Built-in column manager panel | | Sorting | Click header to cycle asc → desc → none | | Custom renderers | renderCell and renderHeader per column | | Theming | 5 built-in presets; full CSS-variable token override | | Headless engine | useGridEngine for custom UI builds | | Zero dependencies | Only React as a peer dep | | TypeScript | Full generics on row data shape |


Installation

npm install @lattice-grid-lib/core
# or
yarn add @lattice-grid-lib/core
# or
pnpm add @lattice-grid-lib/core

Quick start

import { LatticeGrid } from '@lattice-grid-lib/core';

interface Row {
  id: number;
  name: string;
  value: number;
}

const columns = [
  { id: 'name',  label: 'Name',  field: 'name',  width: 200, pinned: 'left' as const },
  { id: 'value', label: 'Value', field: 'value', width: 120 },
];

export function MyGrid({ rows }: { rows: Row[] }) {
  return (
    <LatticeGrid<Row>
      columns={columns}
      data={rows}
      height={500}
    />
  );
}

Column groups

const columns = [
  { id: 'name', label: 'Name', field: 'name', width: 200 },
  {
    id: 'week1',
    label: 'Week 1',
    children: [
      { id: 'd1', label: 'Mon', field: 'd1', width: 80 },
      { id: 'd2', label: 'Tue', field: 'd2', width: 80 },
    ],
  },
];

Custom renderers

const columns = [
  {
    id: 'status',
    label: 'Status',
    field: 'status',
    renderCell: (value, row) => (
      <span style={{ color: value === 'active' ? 'green' : 'red' }}>
        {String(value)}
      </span>
    ),
  },
];

Theming

import { LatticeGrid, GRID_THEMES } from '@lattice-grid-lib/core';

// Built-in preset
<LatticeGrid theme="dark" ... />

// Partial token override (merged on top of light)
<LatticeGrid theme={{ '--vg-accent': '#e11d48' }} ... />

// Full custom theme
const myTheme = { ...GRID_THEMES.dark, '--vg-accent': '#a855f7' };
<LatticeGrid theme={myTheme} ... />

Available presets

"light" · "dark" · "ocean" · "forest" · "sunset"


Headless API

The engine is fully decoupled from the renderer. Use it to build a completely custom grid UI:

import { useGridEngine } from '@lattice-grid-lib/core';

function MyCustomGrid({ columns, data }) {
  const engine = useGridEngine(columns);
  const { visibleColumns, sortState, toggleSort, resizeColumn } = engine;
  // render your own header / body
}

LatticeGrid props

| Prop | Type | Default | Description | |---|---|---|---| | columns | ColumnDef<TData>[] | — | Column tree | | data | TData[] | — | Row data | | getRowId | (row, i) => string | index | Stable row key | | height | number | 480 | Viewport height in px | | rowHeight | number | 36 | Row height in px | | headerHeight | number | 38 | Leaf header row height | | groupHeaderHeight | number | 28 | Group header row height | | theme | ThemePreset \| GridTokens | "light" | Theme preset or token map | | alternateRows | boolean | true | Zebra-stripe rows | | showToolbar | boolean | true | Show built-in toolbar | | showFooter | boolean | true | Show row/col count footer | | toolbarLeft | ReactNode | — | Left toolbar slot | | toolbarRight | ReactNode | — | Right toolbar slot | | emptyState | ReactNode | — | Rendered when data is empty | | onRowClick | (row, i) => void | — | Row click callback | | onSortChange | (sort) => void | — | Sort state change | | onColumnResize | (id, width) => void | — | Resize end callback | | onColumnReorder | (order) => void | — | Reorder callback | | ariaLabel | string | "Data grid" | Grid aria-label |


Development

# Install dependencies
npm install

# Run demo app (hot-reloads library source)
npm run dev

# Build the library
npm run build

# Run tests
npm run test

# Type-check
npm run typecheck

Licence

MIT © Your Name