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 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-light-table

v1.1.1

Published

a light weight react table with sorting and pagination features

Downloads

68

Readme

React Light Table

Overview

React Light Table is a customizable React component designed for creating tables with sorting, pagination, and other features. It offers a clean and straightforward interface for rendering data in a tabular format, providing flexibility and ease of use.

Features

  • Sorting: Enable sorting on columns by clicking the column headers. The table supports ascending, descending, and neutral sort indicators.
  • Pagination: Implement pagination to navigate through large datasets with ease. The component includes a pagination control at the bottom of the table.
  • Clickable Rows: Customize the table to handle row clicks, providing interactive functionality.
  • Loading Spinner: Display a loading spinner while data is being fetched or processed.
  • Customizable Styles: Tailor the appearance of the table with customizable styles for headers, cells, and more.

Installation

To use React Light Table in your React project, follow these steps:

  1. Install the package using your package manager of choice:

    npm install react-light-table

    or

    yarn add react-light-table
  2. Import the component in your React file:

import { ReactLightTable } from 'react-light-table';
  1. Import the css file:
import "react-light-table/style.css";

Usage

The React Light Table component accepts a variety of props to customize its behavior. Here's a basic example of how to use it:

import { ReactLightTable } from 'react-light-table';
import "react-light-table/style.css";

const MyTable = () => {
  // Define your data, columns, and other configuration
  const columns = [
    { key: 'name', title: 'Name', sortable: true },
    { key: 'age', title: 'Age', sortable: true },
    // Add more columns as needed
  ];

  const data = [
    { name: 'John Doe', age: 30 },
    { name: 'Jane Doe', age: 25 },
    // Add more data items as needed
  ];

  return (
    <ReactLightTable
      id="my-table"
      columns={columns}
      data={data}
      sortable={true}
      hasPagination={true}
    />
  );
};

export default MyTable;

Props

  • id: Unique identifier for the table.
  • columns: Array of column configurations.
  • data Array of data items to be displayed in the table.
  • sortable Enable or disable column sorting.
  • hasPagination Enable or disable pagination.
  • ... (and more)

Refer to the Props documentation for a detailed list of available props.

License

This project is licensed under the MIT License.

Contributing

We welcome contributions! Feel free to open issues, submit pull requests, or provide feedback