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

interactive-react-table

v1.1.1

Published

An interactive table component using react

Readme

React Table

A react component to easily create an interactive table.

Quality Gate Status Maintainability Rating Reliability Rating Security Rating
Lines of Code Bugs Code Smells Duplicated Lines (%)

Features

  • Column sorting
  • Data search
  • Pagination
  • Entries counter
  • Responsive design

Installation

Prerequisites: React

npm i interactive-react-table

Basic Usage Example

Import the component:

import { default as ReactTable } from 'interactive-react-table';

Set some data:

const data = [
  {
    firstName: 'Bruce',
    lastName: 'Wayne',
    birthdate: '1939-03-30',
    city: 'Gotham City'
  },
  {
    firstName: 'Peter',
    lastName: 'Parker',
    birthdate: '1962-08-15',
    city: 'New York'
  },
  {
    firstName: 'Clark',
    lastName: 'Kent',
    birthdate: '1939-06-12',
    city: 'Metropolis'
  }
]

Config headers:

const headers = [
  {
    name: 'First Name',
    key: 'firstName'
  },
  {
    name: 'Last Name',
    key: 'lastName'
  },
  {
    name: 'Date of birth',
    key: 'birthdate'
  },
  {
    name: 'City',
    key: 'city'
  }
]

Use component:

<ReactTable data={data} headers={headers} />

Render:


Props

  • data: {Array<Objects>}

    • Required
    • The data you want to display in the table.
    • To ensure a good behavior, make sure that each object have the same properties structure.
  • headers : {Array<Objects>}

    • Required
    • Handle table columns headers.
    • Each object must contain two properties:
      • name : The name to display in the column header
      • key : A string which refers to the corresponding property name.
    • The items in this array must follow the same order as the data objects properties.
  • pageSizeOptions : {Array<Numbers>}

    • Optional
    • Default: [10, 25, 50]
    • Providing options to configure the number of rows per page.
  • defaultSorting : {Object}

    • Optional
    • Default: undefined (No sorting)
    • Provide default sorting settings
    • The object must contains two properties:
      • property : The property you want to sort by
      • order : The sorting order, must be 'ascending' or 'descending'
    • Example : { property : "firstName", order: "ascending" }
  • displayEntries : {Boolean}

    • Optional
    • Default: true
    • Disable entries displayer feature by setting it to false
  • allowSearch : {Boolean}

    • Optional
    • Default: true
    • Disable search feature by setting it to false
  • selectPageSize : {Boolean}

    • Optional
    • Default: true
    • Disable page size selector feature by setting it to false

Customize Style

Just write some styles for class .mainContainer . Your styles will be prioritized over library styles, then target the following selectors to customize what you want.

Header

  • Container: .tableHeader
    • Select page size section: .selectPageSize
    • Search section: .search

Table

  • Container: .table
    • Table headers (th): .table-th
      You can target a specific header by index using: .table-th-1, .table-th-2, .table-th-3, etc.
    • Table headers content: .table-th-content
    • Sort Icons: .table-th-sortIcons
    • Active sort icon: .sortIcon--active
    • Table rows (tr): .table-tr
      You can target a specific row by index using: .table-tr-1, .table-tr-2, .table-tr-3, etc.
    • Table data cells (td): .table-td

Footer

  • Container: .tableFooter
    • Entries displayer: .entriesDisplayer
    • Pagination section: .pagination
    • Pagination buttons: .pagination button
    • Pagination current page button: .pagination button.currentPage

Example:

See full documentation here
Hope it helps !