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 🙏

© 2025 – Pkg Stats / Ryan Hefner

react-elegant-table

v0.1.1

Published

A professional, high-quality React table component

Downloads

188

Readme

React Elegant Table

A professional, high-quality, and highly customizable React table component built on top of TanStack Table v8. Designed for modern web applications with a focus on aesthetics, performance, and developer experience.

License Version

Features

  • 🚀 Built on TanStack Table v8: Headless, type-safe, and powerful.
  • 🎨 Modern & Elegant Design: Beautifully styled out of the box with Tailwind CSS.
  • High Performance: Optimized for large datasets with built-in virtualization.
  • 🔍 Sorting & Filtering: Built-in support for column sorting and filtering.
  • 📄 Pagination: Easy-to-use pagination controls.
  • Row Selection: Multi-row selection with a sticky selection banner.
  • 📱 Responsive: Works seamlessly on desktop and mobile.
  • 🛠 Highly Customizable: easy to override styles and components.
  • 🌑 Dark Mode Support: Fully compatible with dark mode.
  • 🤖 MCP Ready: Includes hooks for integrating with Model Context Protocol servers.

Installation

npm install react-elegant-table
# or
yarn add react-elegant-table
# or
pnpm add react-elegant-table

Usage

Basic Example

import { ElegantTable } from 'react-elegant-table';
import { ColumnDef } from '@tanstack/react-table';

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

const columns: ColumnDef<User>[] = [
  {
    accessorKey: 'name',
    header: 'Name',
  },
  {
    accessorKey: 'email',
    header: 'Email',
  },
  {
    accessorKey: 'role',
    header: 'Role',
  },
];

const data: User[] = [
  { id: 1, name: 'John Doe', email: '[email protected]', role: 'Admin' },
  { id: 2, name: 'Jane Smith', email: '[email protected]', role: 'User' },
];

function App() {
  return (
    <div className="p-8">
      <ElegantTable data={data} columns={columns} />
    </div>
  );
}

Virtualization (High Performance)

For large datasets, enable virtualization to render only the visible rows.

<ElegantTable 
  data={largeDataset} 
  columns={columns} 
  virtualize={true} 
  estimatedRowHeight={48} 
/>

MCP Server Integration (Concept)

React Elegant Table includes a conceptual hook useMCPData to easily fetch and display data from a Model Context Protocol (MCP) server.

import { ElegantTable, useMCPData } from 'react-elegant-table';

// Mock MCP Client
const mcpClient = {
  readResource: async (uri) => {
    // Call your actual MCP server here
    return { contents: [{ text: JSON.stringify([{ id: 1, name: 'MCP User' }]) }] };
  }
};

function MCPTable() {
  const { data, isLoading } = useMCPData(
    mcpClient,
    'mcp://users/list',
    (content) => JSON.parse(content)
  );

  return (
    <ElegantTable 
      data={data} 
      columns={columns} 
      isLoading={isLoading} 
    />
  );
}

API Reference

ElegantTable Props

| Prop | Type | Description | Default | |---|---|---|---| | data | T[] | The data to display in the table. | Required | | columns | ColumnDef<T>[] | The column definitions. | Required | | enableRowSelection | boolean | Enable row selection checkboxes. | false | | enableSorting | boolean | Enable column sorting. | true | | enableFiltering | boolean | Enable column filtering. | true | | enablePagination | boolean | Enable pagination. | true | | pageSize | number | Number of rows per page. | 10 | | onRowClick | (row: T) => void | Callback when a row is clicked. | undefined | | virtualize | boolean | Enable row virtualization for performance. | false | | estimatedRowHeight | number | Estimated height of a row in pixels. | 44 | | isLoading | boolean | Show loading skeleton. | false | | loadingRowCount | number | Number of skeleton rows to show. | 5 |

Customization

You can customize the appearance by overriding the default Tailwind CSS classes or providing your own components.

Contributing

We welcome contributions! Please see our Contributing Guide for details.

License

This project is licensed under the MIT License - see the LICENSE file for details.