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

react-data-table-plugin

v0.1.5

Published

Data table React component

Readme

react-data-table-plugin

This React plugin allows you to create a simple data table in a minimum of time. The table created integrates sorting, filtering and pagination functionalities. It also displays information on the number of records and the filtering result. No customization is required, making implementation quick and easy. Only two props are needed: stored data and column format.

This library was built with React and Css.

Main characteristics

  • Configuration made with two props
  • Built-in functions:
    • Sorting (desc/asc), simple or multi-criteria
    • Pagination
    • Filter

Installation

This documentation contains information about installation and usage.

Prerequisites

NodeJS (version 16.15)

Run the following command to install the plugin

npm install react-data-table-plugin

Implementation

Import plugin

import { DataTable } from "react-data-table-plugin";

Example of data passed to the dataTable prop

1. Prop columnsTitle

const columns = [
  {
    title: "First Name",
    data: "firstName",
    type: "text",
    isRequired: "required",
  },
  {
    title: "Last Name",
    data: "lastName",
    type: "text",
  },
  { title: "Date of Birth", data: "dateOfBirth", type: "date" },
  { title: "Start Date", data: "startDate", type: "date" },
  { title: "Street", data: "street", type: "alphanumeric" },
  { title: "City", data: "city", type: "text" },
  { title: "State", data: "state", type: "list" },
  { title: "Zip Code", data: "zipCode", type: "number" },
  { title: "Department", data: "department", type: "list" },
];

2. Data type and format of column object passed by the columnsTitle prop

  • title: string,
  • data: string in camelcase format,
  • type: string, this property is optional
    1. "text": (default value),
    2. "number": numeric value,
    3. "alphanumeric": string with mixed numbers and characters
    4. "date": date in US format MM/DD/YYYY
  • isRequired, a non-empty string. This property is optional, it sets the column on which the sorting is done after launching the application

3. Prop dataTable

const data = [
  {
    firstName: "Alphonse",
    lastName: "Daudet",
    startDate: "01/02/2000",
    department: "Sales",
    dateOfBirth: "06/21/1968",
    street: "2 rue de Tartarin",
    city: "Tarascon",
    state: "GA",
    zipCode: "30800",
  },
  {
    firstName: "Louis",
    lastName: "delaporte",
    startDate: "07/06/2004",
    department: "Human Resources",
    dateOfBirth: "10/07/1970",
    street: "84 avenue Victor Hugo",
    city: "Bondy",
    state: "SSD",
    zipCode: "93200",
  },
];

Names of the properties of data object must match the values ​​of data properties of the columns object

4. Use of the plug-in

const root = ReactDom.createRoot(document.getElementById("root"));
root.render(
  <StrictMode>
    <DataTable dataTable={data} columnsTitle={columns} />
  </StrictMode>
);