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-tree-grid

v1.0.1

Published

Virtualized, themeable React tree grid for large hierarchical KPI datasets.

Readme

AwesomeTreeGrid

Enterprise-grade tree grid for React. A virtualized, KPI-focused hierarchy grid with inline edits, filtering, sorting, drag-reorder, CSV export, and multi-theme support — all styles are injected at runtime, so no CSS import is needed.


Features

  • Virtualized rows — handles thousands of nodes smoothly with sticky headers/first column
  • Expand / collapse — drill into any branch with fast, cached expansion state
  • Filtering + search — global search plus per-column filters
  • Sorting — sortable hierarchy name and metric/attribute columns
  • Inline edits — double-click metric cells to edit and capture changes
  • Drag reordering — reorder nodes by dragging rows
  • CSV export — one-click export for the current grid view
  • Themes"midnight", "arctic", "forest"
  • Self-contained styles — all styles are inline/injected at runtime
  • ESM + CJS dual build — works in Vite, Next.js, CRA, and modern bundlers
  • Zero runtime dependencies beyond React

Installation

npm install awesome-tree-grid
# or
yarn add awesome-tree-grid
# or
pnpm add awesome-tree-grid

Peer dependencies — React >= 18 and ReactDOM >= 18 must already be installed.


Quick Start

No CSS import needed — styles are injected automatically.

import AwesomeTreeGrid from "awesome-tree-grid";
import { SAMPLE_DATA } from "awesome-tree-grid/sample_data";

export default function App() {
  return (
    <div style={{ height: 680 }}>
      <AwesomeTreeGrid data={SAMPLE_DATA} />
    </div>
  );
}

Props

| Prop | Type | Default | Description | |---|---|---|---| | data | Array | SAMPLE_DATA | Flat node array. Takes precedence over dataUrl. | | dataUrl | string | "" | JSON file path or REST endpoint URL. Used when data is not provided. | | dataPath | string | "" | Optional dot-path to the array inside API responses. | | fetchOptions | object | {} | Fetch options for dataUrl requests. | | title | string | "Awesome Tree Grid" | Header title displayed above the grid. | | initialTheme | "midnight" \| "arctic" \| "forest" | "midnight" | Initial visual theme. | | onNodeEdit | (payload) => void | — | Callback fired on metric edit: { nodeId, key, value }. |


Data Format

Each node is a flat record with parent references:

{
  id: "north-america",
  parentId: null,
  nodeName: "North America",
  attributes: { status: "Active", owner: "Ops" },
  metrics: { revenue: 1284000, margin: 0.42 }
}

Examples

Example 1 — Basic grid (sample data)

import AwesomeTreeGrid from "awesome-tree-grid";
import { SAMPLE_DATA } from "awesome-tree-grid/sample_data";

export default function App() {
  return (
    <div style={{ height: 680 }}>
      <AwesomeTreeGrid data={SAMPLE_DATA} />
    </div>
  );
}

Example 2 — Custom title and theme (sample data)

import AwesomeTreeGrid from "awesome-tree-grid";
import { SAMPLE_DATA } from "awesome-tree-grid/sample_data";

export default function App() {
  return (
    <div style={{ height: 640 }}>
      <AwesomeTreeGrid
        data={SAMPLE_DATA}
        title="Sample KPI Tree"
        initialTheme="forest"
      />
    </div>
  );
}

Example 3 — Capture metric edits (sample data)

import AwesomeTreeGrid from "awesome-tree-grid";
import { SAMPLE_DATA } from "awesome-tree-grid/sample_data";

export default function App() {
  const handleEdit = ({ nodeId, key, value }) => {
    console.log("Edited", nodeId, key, value);
  };

  return (
    <div style={{ height: 640 }}>
      <AwesomeTreeGrid data={SAMPLE_DATA} onNodeEdit={handleEdit} />
    </div>
  );
}

Example 4 — Extended records demo

import AwesomeTreeGrid from "awesome-tree-grid";
import { EXTENDED_RECORDS } from "awesome-tree-grid/extended_records";

export default function App() {
  return (
    <div style={{ height: 720 }}>
      <AwesomeTreeGrid data={EXTENDED_RECORDS} title="Extended Records Demo" />
    </div>
  );
}

Interactions

| Interaction | Action | |---|---| | Click expand/collapse | Expand or collapse a node’s children | | Search input | Filter nodes across name and attributes | | Column filter | Filter by specific attribute/metric values | | Click column header | Sort by name, attribute, or metric | | Double-click metric | Edit a metric value inline | | Drag row | Reorder nodes by dragging | | Context menu | Drill, edit, copy, or remove node actions | | Export menu | Download current rows as CSV |


License

MIT