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

tmt-table-library

v1.0.4

Published

A modern table library for React with built-in sorting, filtering, and custom styling support.

Downloads

323

Readme

# React Customizable Table

A highly customizable and feature-rich React table component with sorting, searching, and theming capabilities.

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [Props](#props)
- [Styling](#styling)
- [Examples](#examples)
- [Contributing](#contributing)
- [License](#license)

## Installation

You can install the package using npm:

```bash
npm install tmt-table-library

Or using yarn:

yarn add tmt-table-library

Usage

Here's a basic example of how to use the Table component:

import React from 'react';
import { Table } from 'react-customizable-table';

const columns = [
  { key: 'id', title: 'ID' },
  { key: 'name', title: 'Name' },
  { key: 'email', title: 'Email' },
];

const data = [
  { id: 1, name: 'John Doe', email: '[email protected]' },
  { id: 2, name: 'Jane Smith', email: '[email protected]' },
  { id: 3, name: 'Bob Johnson', email: '[email protected]' },
];

function App() {
  return (
    <Table
      columns={columns}
      data={data}
      enableSearch={true}
      enableShadow={true}
      theme="light"
    />
  );
}

export default App;

Props

The Table component accepts the following props:

| Prop | Type | Default | Description |-----|-----|-----|----- | columns | Array | Required | An array of column objects with key and title properties | data | Array | Required | An array of objects representing the table data | initialSortColumn | string | '' | The key of the column to initially sort by | initialSortDirection | 'asc' | 'desc' | 'asc' | The initial sort direction | enableSearch | boolean | false | Whether to enable the search functionality | enableShadow | boolean | false | Whether to add a shadow effect to the table | maxWidth | string | '100%' | The maximum width of the table | maxHeight | string | '400px' | The maximum height of the table | customStyles | object | | Custom styles to be applied to the table wrapper | theme | 'light' | 'dark' | 'light' | The theme of the table

Styling

The Table component uses Tailwind CSS classes for styling. You can customize the appearance by overriding these classes or by providing custom styles through the customStyles prop.

To use a dark theme, set the theme prop to 'dark':

<Table
  columns={columns}
  data={data}
  theme="dark"
/>

Examples

Sortable Table

import React from 'react';
import { Table } from 'react-customizable-table';

const columns = [
  { key: 'id', title: 'ID' },
  { key: 'name', title: 'Name' },
  { key: 'age', title: 'Age' },
];

const data = [
  { id: 1, name: 'Alice', age: 30 },
  { id: 2, name: 'Bob', age: 25 },
  { id: 3, name: 'Charlie', age: 35 },
];

function SortableTable() {
  return (
    <Table
      columns={columns}
      data={data}
      initialSortColumn="age"
      initialSortDirection="desc"
    />
  );
}

export default SortableTable;

Searchable Table with Custom Styles

import React from 'react';
import { Table } from 'react-customizable-table';

const columns = [
  { key: 'id', title: 'ID' },
  { key: 'name', title: 'Name' },
  { key: 'email', title: 'Email' },
];

const data = [
  { id: 1, name: 'John Doe', email: '[email protected]' },
  { id: 2, name: 'Jane Smith', email: '[email protected]' },
  { id: 3, name: 'Bob Johnson', email: '[email protected]' },
];

const customStyles = {
  borderRadius: '8px',
  boxShadow: '0 4px 6px rgba(0, 0, 0, 0.1)',
};

function SearchableTable() {
  return (
    <Table
      columns={columns}
      data={data}
      enableSearch={true}
      customStyles={customStyles}
      maxHeight="300px"
    />
  );
}

export default SearchableTable;

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.