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-atomics-paginator

v0.0.26

Published

A powerful, simple, flexible and customizable paginator for react html tables

Downloads

31

Readme

React Table Paginator

A powerful, simple, flexible and customizable paginator for react html tables

Features

  • Paginate tables
  • Customize number of elements per page
  • Auto pagination detection
  • Highly customizable (see list of class names below)
  • Icon customization (uses Font Awesome)
  • Super simple implementation (get started quickly)
  • Responsive
  • Mobile friendly

Important links:

Demo

https://csb-jt1mt.vercel.app//

Customize it yourself:

Installing as a package

npm i react-atomics-paginator

Usage

import React from 'react';
import PaginatorTable from 'react-atomics-paginator'

export default function MyTable() {

    <PaginatorTable 
      options={[5,7,11]} 
      items={products}
      headers={['SKU','Product','Price','Stock','Rating']}
      title="Products"
      btnColor="#5628ee"
      iconColor="#fff"
      activeBtnColor="#f1f1f1"
      activeIconColor="#333"
    />

    const products = [
    {
      sku: 2440,
      name: 'Winter Coat',
      price: 500,
      stock: 'In Stock',
      rating: 4
    },
    {
      sku: 2441,
      name: 'Hat',
      price: 100,
      stock: 'In Stock',
      rating: 4
    },
    {
      sku: 2442,
      name: 'Summer Jacket',
      price: 300,
      stock: 'Out Stock',
      rating: 5
    },
    {
      sku: 2443,
      name: 'Jeans',
      price: 600,
      stock: 'Out Stock',
      rating: 4
    },
    {
      sku: 2444,
      name: 'Pants',
      price: 700,
      stock: 'In Stock',
      rating: 3
    },
    {
      sku: 2445,
      name: 'Shoes',
      price: 340,
      stock: 'In Stock',
      rating: 2
    },
    //...more objects here...
  ]

})

Props

  • options: Array of numbers that will give the option to display # of elements by that given number (Add 'all' as last element to provide the option to display all elements on one page.)

  • items: Array of elements in the table (see example code)

  • headers: Array of table titles that will go inside th html tags

  • title: String that will be displayed as the title of the table

  • btnColor: String of table buttons colors (for more specificity, use class names provided below)

  • iconColor: String of table icon colors

  • activeBtnColor: String that targets the active pagination button background color

  • activeIconColor: String that targets the active pagination icon color

  • backicon: String of Font Awesome icon

  • fastbackicon: String of Font Awesome icon

  • forwardicon: String of Font Awesome icon

  • fastforwardicon: String of Font Awesome icon

  • fastbtns: Boolean to display the fast forward and fast backwards buttons

  • textbtns: Boolean to display text buttons instead of icon buttons

  • fastbacktext: String for the last back text

  • backtext: String for the single back text

  • forwardtext: String for the single forward text

  • fastforwardtext: String for fast forward text

  • footTitle: String for text of the footer title (default is "Show")

  • footSubTitle: String for the footer subtitle (Default is "per page")

Customizing

Contributing

The contributing guide contains details on how to create pull requests and setup your dev environment.

=======================

License

MIT Standard License