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

super-pager

v1.0.3

Published

All in one pagination solution

Readme

Super Pager

A all-in-one library for all kind of pagination classic (with numbers), load more, and infinite scroll. It is built on React.

Features

  • Navigate between the pages using buttons, input box to directly navigate to the specific page.
  • Ability to choose the number of rows per page from a dropdown.
  • Prevent loading all the data in one go, and load the data using load more button.
  • Infinite scroll that allows new data to be displayed either based on window height or wrapper height.

Usage

import SuperPager from "../../components/SuperPager";
//props used by Pagination
<SuperPager type="infiniteScroll" />;

Props

SuperPager

| Parameter | Type | Description | | :-------- | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | type | String | Required. This prop is used to specify the type of component that must be rendered. The allowed Values are : "infiniteScroll" or "pagination" or "loadMore" |

Props as per chosen type

Classic Pagination

| Parameter | Type | Description | | :------------------ | :--------- | :-------------------------------------------------------------------------------------------------- | | currentPage | Number | Required. This prop is used to define the current page. | | onPageChange | Function | Required. Callback function to change the page Number | | totalRecordsCount | Number | Required. This prop is used to specify the total number of records available | | recordsPerPage | Number | This prop is used to specify the default page size that must be selected by default on the dropdown | | pageSizes | Array | This prop specifies the various options to show different page Sizes on the dropdown | | onPageSizesChange | Function | Required. Callback function that changes the number of records per page option. |

Load More

| Parameter | Type | Description | | :-------------- | :--------- | :------------------------------------------------------------------------------------------------------------------------------ | | handleClick | Function | Required. Callback function to load more data when the button is clicked | | disableButton | boolean | Required. This prop will disable the button if there is no more data to be fetched | | styles | object | Specify the styles for the button in an object format. Example {bgColor:"#000", color:"#fff", fontSize:"10px", width:"50%"} | | hoverBg | string | Background color of the load more button when it is hovered | | hoverColor | string | Color of the load more button text when it is hovered |

Infinite Scroll

| Parameter | Type | Description | | :----------- | :------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | dataLength | Number | Required. The number of records that are available on state | | loadMore | Function | Required. The callback function that triggers the api call to get the next set of records | | hasMore | boolean | Required. This prop indicates if there is still more data to be received from api | | wrapper | boolean | If this prop is set to true, and if the component is inside a wrapper that has a height and scroll property, then new data is fetched when user scrolls to the end of the wrapper. By default the user has to scroll till the end of window. | | loader | HTML or React Compponent | Dispaly a loading indicator when data is getting fetched | | children | HTML or JSX or React Component | The items that need to be rendered |

Example

Classic Pagination

import SuperPager from "../../components/SuperPager";
export const App = () => {
  return (
    <>
      <SuperPager
        type="pagination"
        currentPage={currentPage}
        onPageChange={handlePageChange}
        totalRecordsCount={posts.length}
        recordsPerPage={itemsPerPage}
        pageSizes={[5, 10, 15, 20, 30]}
        onPageSizesChange={handlePageSizesChange}
      />
    </>
  );
};

Load More

import SuperPager from "../../components/SuperPager";
export const App = () => {
return (
    <>
    <SuperPager
      handleClick={loadMore}
      disableButton={hasMore}
      styles={{
        bgColor:"grey",
        color:"skyblue",
        width:"50%",
      }}
      hoverBg="skyblue"
      hoverColor="#000"
      type="loadMore"
    />
   </>
)

Infinite Scroll

import SuperPager from "../../components/SuperPager";
export const App = () => {
return (
    <>
    <SuperPager
      type="infiniteScroll"
      dataLength={posts.length}
      loadMore={loadMore}
      hasMore={hasMore}
      children={posts.map((post) => (
        <div key={post.id} className="infi-post">
        <p>{post.body}</p>
      </div>
      ))}
    >
    </>
)