# react-studio-paginator

> A react paginator component that displays a list of items in a numbered page

Latest version **0.0.7** (published 2019-06-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-studio-paginator
pnpm add react-studio-paginator
yarn add react-studio-paginator
bun add react-studio-paginator
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.7 |
| Published | 2019-06-27 |
| First published | 2019-02-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 23.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Gera Kourtidis |
| Maintainers | geratokyo |
| Keywords | react, typescript, paginator, react-component, react-studio |

## Links

- npm: https://www.npmjs.com/package/react-studio-paginator
- Repository: https://github.com/geratokyo/react-studio-paginator
- Homepage: https://github.com/geratokyo/react-studio-paginator#readme
- Issues: https://github.com/geratokyo/react-studio-paginator/issues
- npm.io page: https://npm.io/package/react-studio-paginator

## Dependencies (2)

- [react](https://npm.io/package/react.md) ^16.8.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.11

## 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

- 0.0.7 (latest) — 2019-06-27
- 0.0.6 — 2019-05-07
- 0.0.5 — 2019-02-14
- 0.0.4 — 2019-02-12
- 0.0.2 — 2019-02-06
- 0.0.1 — 2019-02-06

## README

# react-studio-paginator

A react paginator component that displays a list of items in a numbered page

----

## Props
----
|Name|Type|Descriptions|
|-----|------|---|
|customElement|(index:number)=> React.ReactNode|This is a method that will be called to retrieve a single item of the paginator.|
|elementsPerView?|number|The number of elements to be shown in one page|
|totalElements|number|Total number of elements to be shown in different pages|
|defaultPageIdx?|number|This can be set if you need to start the page from a different index|
|showPaginatorControls?|boolean|True if it should show the controls and the page numbers|
|className?|string|Parent element class name|
|previousButton?|React.ReactNode|Component for the previous button|
|nextButton?|React.ReactNode|Component for the next button|
pageStatusComponent?|(currentPage:number, totalPages:number) =>React.ReactNode|This is a function to show the current page status|


## Default Props
----
|Name|Default|
|---|---|
|className|```""```| 
|showPaginatorControls|```true```| 
|elementsPerView|```10```| 
|previousButton|```<button>Previous</button>```| 
|nextButton|```<button>Next</button>```| 
|pageStatusComponent|```(e,i)=> `${e} of ${i}`}```| 

## Installation 

```
$ npm install --save react-studio-paginator
```

## Usage

```
import {Paginator} from "react-studio-paginator";
```


#### Simple Example

```
<Paginator 
    totalElements={data.length}
    customElement={(idx)=>{
        let item = data[idx];
        return <div>{item.label}</div>
    }}
/>
```

## Other Links
More details on how to use this component can be found in this [article](https://roobley.com/add-a-paginator-to-your-app-with-react-studio-paginator)

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