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

open-classrooms-p14-data-table-library

v1.0.2

Published

"A React component that displays data in the form of a table"

Readme

open-classrooms-p14-data-table-library

1. About

This is a React component to display data in the form of a table.

2. Functionalities

  • Selectable number of entries shown per page.
  • Search functionality to display only data matching your search.
  • Sort every column in ascending or descending order (works with dates and numbers too)
  • Multiple page table
  • Fully customisable CSS file included

3. Install

npm install open-classrooms-p14-data-table-library

4. Use case

Further explanation in section 5.

import { DataTable } from "open-classrooms-p14-data-table-library";
import "open-classrooms-p14-data-table-library/dist/index.css";

export default function EmployeeList(){

    const data = [
        {
            name: "John Doe",
            dateStarted: "04/17/2015",
            age: 28
        },
        {
            name: "Tony Stark",
            dateStarted: "06/24/2018",
            age: 37
        }
    ]

    const tableHeaders = [
        {
            header: "Name",
            dataKey: "name"
        }
        {
            header: "Date Started",
            dataKey: "dateStarted",
            isDate: true
        }
        {
            header: "Age",
            dataKey: "age"
        }
    ]

    const entriesPerPage = [5,10,25,50,100]

    return(
        <DataTable data={data} tableHeaders={tableHeaders} entriesPerPage={entriesPerPage} />
    )
}

5. Properties

NOTE: All 3 properties are compulsory for the table to work properly

5.1 {data}

  • An Array of Objects where each object represents a row on the table.
  • The objects doesn't need to be organised and trimmed down since the table will be generated using the [tableHeaders] array instead.
  • That said keep in mind that less unused data sent to the table means faster table rendering.

5.2 {tableHeaders}

  • An Array of Objects where each object represents the header for each collumn.
  • This array must be in the order in which you desire the collumns to be generated.
  • Make sure that the values of dataKey is identical to the keys of {data}.
  • For dates to be sorted correctly: Add isDate: true .
  • Dates should be sent in standard American format mm/dd/yyyy, also obtained with exampleDate.toLocaleDateString() .

5.3 {entriesPerPage}

  • An Array of Numbers where each number represents how many rows of data to display per table page.
  • This array will customize the "show entries" dropdown.

6. Customization

  • To customize the appearance simply copy the css code from open-classrooms-p14-data-table-library/dist/index.css inside the node_modules folder and paste it into your own css file.
  • You are now free to change the appearance at will.
  • Don't forget to not import the integrated css if you wish to use custom css