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

@gridcore/react-smart-table

v0.1.2

Published

A smart table component for React

Downloads

292

Readme

React Smart Table

A customizable, feature-rich table component for React with TypeScript support. Inspired by enterprise-grade table implementations.

Features

  • Sorting - Click column headers to sort
  • Row Selection - Checkbox support with bulk selection
  • Custom Rendering - Full control over cell rendering
  • Actions - Built-in edit/delete actions
  • Loading States - Skeleton loading UI
  • TypeScript - Full type safety with generics
  • Responsive - Mobile-friendly design
  • Customizable - Tailwind CSS styling

Installation

npm install react-smart-table

Basic Usage

import { SmartTable } from 'react-smart-table';

interface User {
  id: number;
  name: string;
  email: string;
  status: string;
}

const users: User[] = [
  { id: 1, name: 'John Doe', email: '[email protected]', status: 'Active' },
  { id: 2, name: 'Jane Smith', email: '[email protected]', status: 'Inactive' }
];

function App() {
  return (
    <SmartTable
      data={users}
      columns={[
        { key: 'id', title: 'ID', sortable: true },
        { key: 'name', title: 'Name', sortable: true },
        { key: 'email', title: 'Email' },
        { 
          key: 'status', 
          title: 'Status',
          render: (value) => (
            <span className={value === 'Active' ? 'text-green-600' : 'text-red-600'}>
              {value}
            </span>
          )
        }
      ]}
    />
  );
}

Advanced Usage

With Actions and Selection

const [selectedRows, setSelectedRows] = useState<string[]>([]);

<SmartTable
  data={users}
  columns={columns}
  showCheckbox={true}
  showActions={true}
  selectedRows={selectedRows}
  onSelectionChange={setSelectedRows}
  onEdit={(row) => console.log('Edit:', row)}
  onDelete={(row) => console.log('Delete:', row)}
  onRowClick={(row) => console.log('Clicked:', row)}
  rowKey="id"
/>

With Loading State

<SmartTable
  data={users}
  columns={columns}
  loading={isLoading}
  emptyMessage="No users found"
/>

API Reference

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | data | T[] | required | Array of data objects | | columns | Column<T>[] | required | Column definitions | | className | string | '' | Additional CSS classes | | showCheckbox | boolean | false | Show row selection checkboxes | | showActions | boolean | false | Show actions column | | onEdit | (row: T) => void | - | Edit button handler | | onDelete | (row: T) => void | - | Delete button handler | | onRowClick | (row: T) => void | - | Row click handler | | loading | boolean | false | Show loading skeleton | | emptyMessage | string | 'No data available' | Empty state message | | selectedRows | string[] | [] | Selected row keys | | onSelectionChange | (selected: string[]) => void | - | Selection change handler | | rowKey | keyof T | 'id' | Unique row identifier |

Column Definition

interface Column<T> {
  key: keyof T;              // Data key
  title: string;             // Column header
  sortable?: boolean;        // Enable sorting
  render?: (value: any, row: T) => React.ReactNode;  // Custom cell renderer
}

Build

npm run build

Development

npm run dev

License

MIT