# @kevinwang0316/react-materialui-pagination

> A pagination component for React and Material-UI (version > 1.0.0).

Latest version **1.1.4** (published 2019-01-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install @kevinwang0316/react-materialui-pagination
pnpm add @kevinwang0316/react-materialui-pagination
yarn add @kevinwang0316/react-materialui-pagination
bun add @kevinwang0316/react-materialui-pagination
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.4 |
| Published | 2019-01-29 |
| First published | 2018-07-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 11 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Kevin W. |
| Maintainers | kevinwang0316 |
| Keywords | React, Material-UI, Pagination, react-component, material-ui, material design, material ui component, material ui pagination |

## Links

- npm: https://www.npmjs.com/package/@kevinwang0316/react-materialui-pagination
- Repository: https://github.com/PengWang0316/ReactMaterialUiPagination
- Homepage: https://github.com/PengWang0316/ReactMaterialUiPagination#readme
- Issues: https://github.com/PengWang0316/ReactMaterialUiPagination/issues
- npm.io page: https://npm.io/package/@kevinwang0316/react-materialui-pagination

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.1.4 (latest) — 2019-01-29
- 1.1.3 — 2018-07-30
- 1.1.2 — 2018-07-30
- 1.1.1 — 2018-07-30
- 1.1.0 — 2018-07-29
- 1.0.1 — 2018-07-29
- 1.0.0 — 2018-07-28

## README

# React-materialui-pigination

A simple react component with Material-UI for pagination

[![Build Status](https://travis-ci.org/PengWang0316/ReactMaterialUiPagination.svg?branch=master)](https://travis-ci.org/PengWang0316/ReactMaterialUiPagination)
[![Coverage Status](https://coveralls.io/repos/github/PengWang0316/ReactMaterialUiPagination/badge.svg?branch=master)](https://coveralls.io/github/PengWang0316/ReactMaterialUiPagination?branch=master)

![](http://res.cloudinary.com/orderstaker/image/upload/c_scale,q_auto:good,w_380/v1532933078/others/20180729_234108.gif)

# Installing

```
npm install --save @kevinwang0316/react-materialui-pagination
```

# Dependencies requirement

Due to this library is using React and Material-ui, some libraries are required.
Usually, the project needs this component has already installed these libraries. Please check your package.json file.

- @material-ui/core
- react
- prop-types

# Usage

```javascript
import Pagination from '@kevinwang0316/react-materialui-pagination';

// In your component
<Pagination
  offset={startOffsetNumber}
  limit={limitationForEachPage}
  total={totalNumber}
  onClick={onClickCallBackFunction}
/>
```

# A mini example

```javascript
import React from 'react';
import ReactDOM from 'react-dom';
import MuiThemeProvider from '@material-ui/core/styles/MuiThemeProvider';
import Pagination from '@kevinwang0316/react-materialui-pagination';
 
class PaginationExample extends React.Component {
  
  handleClick = offset => {
    // Do your data loading or whatever you want here with the offset.
  };
 
  render() {
    return (
      <MuiThemeProvider>
        <Pagination
          offset={0}
          limit={10}
          total={100}
          onClick={this.handleClick}
        />
      </MuiThemeProvider>
    );
  }
}
 
ReactDOM.render(
  <PaginationExample/>,
  document.getElementById('app')
);
```

# Props explaination

| Name        | Type           | Desription  |
| ------------- |-------------| -----|
| offset (required) | number | This tells the pagination how many rows will be skipped when initializes the component.  It should be equal or greater than 0. |
| limit (required) | number | The number of rows will be showed in one page.  It should be equal or greater than 1. |
| total (required) | number | The total number of rows.  It should be greater than 0. |
| onClick (required) | function | The callback function will be called when a user click a page number.  The function will be:  function(offset) => void  offset: A number of new offset |


# License

React-materialui-pagination is licensed under MIT License - see the [License file](https://github.com/PengWang0316/ReactMaterialUiPagination/blob/master/LICENSE).

---
_Source: https://npm.io/package/@kevinwang0316/react-materialui-pagination · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
