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

mr01-table-plugin

v0.8.1

Published

The Table Plugin Modulable is a versatile React component designed for displaying and managing tabular data. It comes with features such as sorting, searching, pagination, and customizable entries per page. This README will guide you through the installat

Downloads

186

Readme

Table Plugin Modulable

The Table Plugin Modulable is a versatile React component designed for displaying and managing tabular data. It comes with features such as sorting, searching, pagination, and customizable entries per page. This README will guide you through the installation, functionality, usage, and advantages of the plugin.

Introduction

The Table Plugin Modulable provides a flexible solution for efficient tabular data management in React applications. It offers modularity, configurability, and a user-friendly interface for enhanced data visualization.

Installation

To install the Table Plugin Modulable, follow these steps:

  1. Ensure you have Node.js installed on your machine.

  2. Install the table-plugin using npm or yarn:

    npm install mr01-table-plugin

Usage

Importing the Plugin

Import the TablePlugin component into your React application where you want to use it:

import { TablePlugin } from 'mr01-table-plugin';

Integrating the Plugin

Use the TablePlugin component in your JSX:

function App() {
  // headers of the array by example
  const headers: string[] = ["Firstname", "Lastname", "date of birth"];
  // data in the array by example
  const data: string[][] = [
    ["Stannis", "Baratheon", "1989/12/05"],
    ["Romulus", "Calghar", "1979/11/09"],
    ["Karadoc", "Ladose", "1998/10/13"],
    ["Perceval", "Legallois", "1997/09/17"],
    // ...
  ];

  return (
    <div className="App">
      {/* Utilization with headers and data */}
      <TablePlugin headers={headers} data={data} />
    </div>
  );
}

export default App;

Features and Customization

The Table Plugin Modulable offers the following features:

  • Sorting: Click on column headers to sort data in ascending or descending order.

sorting example

  • Searching: Utilize the search bar to filter data based on a search term. searching example
  • Pagination: Navigate through multiple pages of data with the pagination controls. pagination example
  • Entries Per Page: Adjust the number of entries displayed per page using the dropdown. entries example
  • Possibility to display or don't display element,if the showHeader or showTableInfo are false, they will be don't display, if they are true, they will be display
function App() {
  // headers of the array by example
  const headers: string[] = ["Firstname", "Lastname", "date of birth"];
  // data in the array by example
  const data: string[][] = [
    ["Stannis", "Baratheon", "1989/12/05"],
    ["Romulus", "Calghar", "1979/11/09"],
    ["Karadoc", "Ladose", "1998/10/13"],
    ["Perceval", "Legallois", "1997/09/17"],
    // ...
  ];

  return (
    <div className="App">
      {/* Utilization with headers and data */}
      <TablePlugin headers={headers} data={data} showHeader={false} showTableInfo={false} />
    </div>
  );
}

export default App;

Components Overview

  • TablePlugin The main component that orchestrates the rendering of the table and controls.

  • EntriesPerPageDropdown A dropdown component to choose the number of entries per page.

  • SearchBar An input component for searching/filtering data with optional filter status.

  • SortIcon Displays an arrow icon indicating the sorting direction.

  • TableInfo Displays information about the current page, total entries, and search term.

Advantages

  • Modularity: Each feature is encapsulated into separate components, promoting reusability.

  • Configurability: Easily configure the number of entries per page and handle sorting logic.

  • User-friendly: Intuitive UI with clear indicators for sorting and filtering.

  • Responsive: Adapts seamlessly to different screen sizes.

Enjoy using the Table Plugin Modulable for efficient tabular data management in your React applications!