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

awesome-data-grid

v0.1.5

Published

Awesome Data Grid Component!

Readme

Awesome Data Grid Component

Awesome Data Grid is a feature-rich, themeable React data grid/table with client-side sorting, filtering, grouping, column visibility, drag-and-drop ordering, resizable columns, CSV export, and optional virtualization for large datasets. It also supports personalization stored in IndexedDB.

Features

  • Client-side sorting, filtering, and grouping [Hierarchy View]
  • Column visibility + Drag-and-Drop ordering [Using - Pane/Drawer on right hand side]
  • Resizable columns with persistence
  • CSV export
  • Theme switcher (light/dark/purple)
  • Virtualized rendering for large datasets (All rows mode)
  • Date filtering with HTML5 date input
  • Personalization stored in IndexedDB

Watch the demo here

Watch the Demo

Install

npm install awesome-data-grid

Usage

import { AwesomeDataGrid } from "awesome-data-grid";
import "awesome-data-grid/style.css";

export default function App() {
  return (
    <AwesomeDataGrid
      apiEndpoint="/api/orders"
      storageKey="orders-grid"
      rowKey="id"
      theme="light"
      currency="USD"
      currencyColumns={["total", "tax", "grandTotal"]}
      pageSizeOptions={[50, 100, 200, 500, 0]} // 0 = All
      defaultPageSize={100}
      rowsPerPage={25}
      dateFormat={{
        locale: "en-US",
        options: { year: "numeric", month: "2-digit", day: "2-digit" },
      }}
      dateSeparator="/"
      computedColumns={[
        {
          key: "totalWithTax",
          label: "Total + Tax",
          formula: (row) => Number(row.total || 0) * 1.18,
        },
      ]}
    />
  );
}

API Contract (Expected Response Shape)

The component expects a JSON response with data and columns.

Example response:

{
  "columns": [
    {
      "key": "CustomerId",
      "label": "Customer Id",
      "format": null,
      "type": "Int32"
    },
    {
      "key": "ContactName",
      "label": "Contact Name",
      "format": null,
      "type": "String"
    },
    {
      "key": "City",
      "label": "Living City",
      "format": null,
      "type": "String"
    }
  ],
  "data": [
    {
      "CustomerId": 1,
      "ContactName": "Kiran Shah",
      "City": "Patna",
      "State": "Bihar",
      "Country": "India",
      "ZipCode": "800001",
      "Approved": false,
      "JoiningDate": "2024-07-01T14:33:39.8623856+05:30"
    },
    {
      "CustomerId": 2,
      "ContactName": "Rohan Kulkarni",
      "City": "Ahmedabad",
      "State": "Gujarat",
      "Country": "India",
      "ZipCode": "380001",
      "Approved": false,
      "JoiningDate": "2022-06-06T14:33:39.8623899+05:30"
    },
    {
      "CustomerId": 3,
      "ContactName": "Amit Mehta",
      "City": "Jaipur",
      "State": "Rajasthan",
      "Country": "India",
      "ZipCode": "302001",
      "Approved": true,
      "JoiningDate": "2021-07-24T14:33:39.8623901+05:30"
    }
  ],
  "totalCount": 200
}

Notes

  • columns can be an array of strings or objects.
    • String format: ["id", "customer_name", "order_date", "total"]
    • Object format: { key: "order_date", label: "Order Date" }
  • data is an array of objects; keys are normalized to camelCase.
  • Date detection is automatic when values can be parsed as valid dates.

Props

| Prop | Type | Default | Description | | --- | --- | --- | --- | | apiEndpoint | string | required | API URL that returns data + columns. | | rowKey | string | required | Unique key field for each row (e.g., id). | | theme | "light" \| "dark" \| "purple" | "light" | Theme for the table UI. | | storageKey | string | "awesome-data-grid" | Override the IndexedDB key used for persisting preferences. Use a unique value per grid instance to avoid collisions. | | currency | "INR" \| "USD" | "INR" | Currency used for numeric cell formatting. | | currencyColumns | string[] | [] | Columns (by key) to format as currency. Keys are normalized to camelCase. | | computedColumns | Array<{ key, label, formula }> | [] | Add computed columns from row data. | | pageSizeOptions | number[] | [50, 100, 500, 1000, 0] | Page size choices; 0 means "All". | | defaultPageSize | number | first option | Initial page size. Must exist in pageSizeOptions. | | rowsPerPage | number | 50 | Rows shown per page in the UI when paginating. | | dateFormat | { locale, options } | en-US, {year,month,day} | Intl date formatting options. | | dateSeparator | "/" \| "-" | "/" | Separator between date parts. |

dateFormat.options.month values

  • numeric -> 1
  • 2-digit -> 01
  • short -> Jan
  • long -> January
  • narrow -> J

Export

import { AwesomeDataGrid } from "awesome-data-grid";

Build Output

When building the library (npm run build:lib), the package artifacts are generated in the dist/ folder.

Styling

AwesomeDataGrid ships with a bundled stylesheet. Import it once in your app:

import "awesome-data-grid/style.css";

Personalization Persistence (IndexedDB)

AwesomeDataGrid stores personalization in IndexedDB (not LocalStorage) so settings survive refreshes:

  • Theme
  • Sort order
  • Column order + visibility
  • Grouping selections
  • Column widths
  • Page size + rows-per-page

Use a unique storageKey per grid instance if you render multiple grids on the same page:

<AwesomeDataGrid apiEndpoint="/api/orders" rowKey="id" storageKey="orders-grid" />
<AwesomeDataGrid apiEndpoint="/api/customers" rowKey="id" storageKey="customers-grid" />

📊 Mock Data

If you need sample data to test your integration, you can use our pre-configured JSON mock file.

Direct Download

Click the button below to view or save the mock data file:

Download the Document

Note: If the file opens in your browser, just right-click and select "Save As..."

License

MIT