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

react-pagination-list-v2

v1.0.12

Published

A simple react pagination list component inspired from the original react-pagination-list that takes an array of objects and paginates as you want

Readme

PaginationList

PaginationList is a React component designed to render paginated lists of items. It utilizes Material-UI Pagination component and allows for custom item rendering and various styling options. ✨powered by Mr. John 😎🤘

NPM LINK

🌍 react-pagination-list-v2

Installation

You can install the package using npm or yarn:

npm install react-pagination-list-v2 --legacy-peer-deps

or

yarn add react-pagination-list-v2 --legacy-peer-deps

Usage

Here's a basic example of how to use the PaginationList component in your React project:

import React from 'react';
import  { UserCard , PaginationList } from 'pagination-list';

const users = [];

for (let i = 1; i <= 30; i++) {
    users.push({
        id: i,
        name: `John${i}`,
        email: `john${i}@gmail.com`,
        phone: `0123456789${i}`
    });
}

const App = () => (
    <PaginationList
        data={users}
        pageSize={10}
        renderItem={(user) => <UserCard user={user} />}
        color="primary"
        shape="circular"
        variant="contained"
        size="medium"
    />
);

export default App;

With custom pagination icon

import React from 'react';
import  { UserCard , PaginationList } from 'pagination-list';

const users = [];

for (let i = 1; i <= 30; i++) {
    users.push({
        id: i,
        name: `John${i}`,
        email: `john${i}@gmail.com`,
        phone: `0123456789${i}`
    });
}

const App = () => (
    <PaginationList
        data={users}
        pageSize={10}
        renderItem={(user) => <UserCard user={user} />}
        color="primary"
        shape="circular"
        variant="contained"
        size="medium"
        customPaginationIcon={{previous: ArrowBackIcon, next: ArrowForwardIcon}}
    />
);

export default App;

Props

| Prop | Type | Default | Description | |----------------------|----------|---------------------------------------------|----------------------------------------------------------------------------------------------------------------------| | data | Array | (required)[] | An array of items to be paginated. | | pageSize | Number | 10 | The number of items per page. | | renderItem | Function | (item,index)=>{} | A function that takes an item and its index as arguments and returns a React element. Renders each item in the list. | | color | String | 'primary' | The color of the pagination controls. Valid values are 'primary', 'secondary', and 'standard'. | | shape | String | 'circular' | The shape of the pagination controls. Valid values are 'circular' and 'rounded'. | | variant | String | 'text' | The variant of the pagination controls. Valid values are 'outlined', 'text', and 'contained'. | | size | String | 'small' | The size of the pagination controls. Valid values are 'small', 'medium', and 'large'. | | controlPosition | String | 'center' | The controlPosition of the pagination controls. Valid values are 'center', 'left', and 'right'. | | controlStyle | Object | {} | An object of style to be applied to pagination controls. | | customPaginationIcon | Object | {previous: <PrevIcon /> next: <NextIcon />} | |

This table provides a clear overview of the available props for the PaginationList component, their types, default values, and descriptions.

The PaginationList component accepts the following props:

  • data (required): An array of items to be paginated.
  • pageSize (optional, default: 10): The number of items per page.
  • renderItem (optional, default: renders a UserCard component for each item): A function that takes an item and its index as arguments and returns a React element. This function is used to render each item in the list.
  • color (optional, default: 'primary'): The color of the pagination controls. Valid values are 'primary', 'secondary', and 'standard'.
  • shape (optional, default: 'circular'): The shape of the pagination controls. Valid values are 'circular' and 'rounded'.
  • variant (optional, default: 'outlined'): The variant of the pagination controls. Valid values are 'outlined', 'text', and 'contained'.
  • size (optional, default: 'medium'): The size of the pagination controls. Valid values are 'small', 'medium', and 'large'.
  • controlPosition (optional, default: 'center'): The position of the pagination controls. Valid values are 'center', 'left', and 'right'.
  • controlStyle (optional, default: {}): The style of the pagination controls wrapper. default value is '{}'.
  • customPaginationIcon (optional, default: {}): The custom pagination icon for controls. default value is '{}', if you want to assign a custom icon just pas an object with previous and next property.

Example

Here's a more detailed example with custom rendering:

import React from 'react';
import  { PaginationList } from 'pagination-list';


const items = [
    { id: 1, label: 'Item 1' },
    { id: 2, label: 'Item 2' },
    // ... more items ...
];

const CustomItemRenderer = (item) => (
    <div style={{ padding: '10px', border: '1px solid #ccc' }}>
        <h3>{item.label}</h3>
    </div>
);

const App = () => (
    <PaginationList
        data={items}
        pageSize={5}
        renderItem={CustomItemRenderer}
        color="secondary"
        shape="rounded"
        variant="contained"
        size="small"
        controlPosition='center'
        controlStyle={{padding:'20px'}}
        customPaginationIcon={{previous: ArrowBackIcon, next: ArrowForwardIcon}}
    />
);

export default App;

In this example, we're rendering a list of custom items with a larger pagination component.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you'd like to change.

Please make sure to update tests as appropriate.

License

MIT