# react-pagination-lite

> A light weight react pagination component built using react hooks and styled using flex layout.It comes with minimal pagination,css configuration.

Latest version **1.3.1** (published 2020-02-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-pagination-lite
pnpm add react-pagination-lite
yarn add react-pagination-lite
bun add react-pagination-lite
```

## 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.3.1 |
| Published | 2020-02-11 |
| First published | 2020-01-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 14.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Harish Singh Dhami |
| Maintainers | hdhami |
| Keywords | react, reactjs, pagination, paginator, webpack, rollup, babel, paginate, lightweight, lite |

## Links

- npm: https://www.npmjs.com/package/react-pagination-lite
- Repository: https://github.com/hdhami/react-pagination-lite
- Homepage: https://github.com/hdhami/react-pagination-lite#readme
- Issues: https://github.com/hdhami/react-pagination-lite/issues
- npm.io page: https://npm.io/package/react-pagination-lite

## Dependencies (1)

- [react](https://npm.io/package/react.md) ^16.12.0

## 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.3.1 (latest) — 2020-02-11
- 1.3.0 — 2020-02-03
- 1.2.0 — 2020-02-03
- 1.1.10 — 2020-02-01
- 1.1.9 — 2020-02-01
- 1.1.8 — 2020-01-31
- 1.1.7 — 2020-01-30
- 1.1.5 — 2020-01-28
- 1.1.4 — 2020-01-26
- 1.1.3 — 2020-01-26
- 1.1.1 — 2020-01-26
- 1.1.0 — 2020-01-26
- 1.0.0 — 2020-01-26

## README

# react-pagination-lite

# Description

A light weight react pagination component built using react hooks and styled using flex layout.It comes with minimal pagination, css configuration.

### Features

-   Customizable
-   Responsive
-   SSR support
-   Does not rely on additional css reference other than configuration

### Demo

<https://hdhami.github.io/react-pagination-lite.html>

### Installing as a package

`npm install react-pagination-lite --save`

### Usage

```javascript
import React, { useState } from 'react';
import { render } from 'react-dom';
import Pagination from 'react-pagination-lite';

const PaginationDemo = () => {
    const [activePage, setActivePage] = useState(1);

    return (
        <Pagination
            range={3}
            activePage={activePage}
            totalCount={27}
            itemsPerPage={5}
            onPaginate={pageId => {
                setActivePage(pageId);
            }}
            styles={{
                navigationBtns: {
                    activeIconColor: '#000',
                    inactiveIconColor: '#b5b5b5',
                    borderColor: '#eeeeee'
                },
                paginationCells: {
                    padding: '0 12px',
                    activeBgColor: '#92a772',
                    inactiveBgColor: '#f2f2f2',
                    textColor: '#000000'
                }
            }}
        />
    );
};

render(<PaginationDemo />, document.getElementById('root'));
```

| Attributes   |    Type    |                        Default                         | Description                                       |
| :----------- | :--------: | :----------------------------------------------------: | :------------------------------------------------ |
| range        |  `number`  |                          `3`                           | number of pagination blocks to be shown at a time |
| activePage   |  `number`  |                          `1`                           | active page id                                    |
| totalCount   |  `number`  | `` | total number of records to be shared across pages |
| itemsPerPage |  `number`  |                          `5`                           | records to be shown on a page                     |
| onPaginate   | `function` |       `` | callback to be invoked on page change       |
| styles       |  `object`  | `` | styles for pagination cell, next, prev navigation |

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

### Contributing

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

### Raising issues

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

## License

Please see [LICENSE] for details.

[license]: https://github.com/hdhami/react-pagination-lite/blob/master/LICENSE

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