# react-ts-pager

> React pager component.

Latest version **2.0.1** (published 2020-07-31) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-ts-pager
pnpm add react-ts-pager
yarn add react-ts-pager
bun add react-ts-pager
```

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2020-07-31 |
| First published | 2019-02-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 9 |
| Unpacked size | 32.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Clint Andrews |
| Maintainers | candrews74 |
| Keywords | pager, pagination, react, typescript |

## Links

- npm: https://www.npmjs.com/package/react-ts-pager
- Repository: https://github.com/clinta74/react-ts-pager
- Homepage: https://github.com/clinta74/react-ts-pager#readme
- Issues: https://github.com/clinta74/react-ts-pager/issues
- npm.io page: https://npm.io/package/react-ts-pager

## Dependencies (9)

- [react](https://npm.io/package/react.md) ^16.13.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.19
- [react-dom](https://npm.io/package/react-dom.md) ^16.13.1
- [classnames](https://npm.io/package/classnames.md) ^2.2.6
- [react-select](https://npm.io/package/react-select.md) ^3.1.0
- [react-hot-loader](https://npm.io/package/react-hot-loader.md) ^4.12.21
- [@fortawesome/react-fontawesome](https://npm.io/package/@fortawesome/react-fontawesome.md) ^0.1.11
- [@fortawesome/fontawesome-svg-core](https://npm.io/package/@fortawesome/fontawesome-svg-core.md) ^1.2.30
- [@fortawesome/free-solid-svg-icons](https://npm.io/package/@fortawesome/free-solid-svg-icons.md) ^5.14.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

- 2.0.1 (latest) — 2020-07-31
- 2.0.0 — 2020-07-31
- 1.0.12 — 2020-04-04
- 1.0.11 — 2019-04-20
- 1.0.10 — 2019-04-20
- 1.0.9 — 2019-04-20
- 1.0.8 — 2019-04-20
- 1.0.7 — 2019-02-24

## README

# react-pager
React pagination control using BootStrap v4 and Font Awesome default icons.

## Usage
```
import { Pager } from '/react-ts-pager';
```

```
    <Pager 
        currentPage={number} // Current page
        total={number} // Total number of items.
        itemsPerPage={number} // The items shown per page.
        visiblePages={number} // Number of page numbered buttons to show.
        titles={object} // JSX Elements used for non page number buttons ie. first (optional).
        className={string} // ClassName added to pager controls (optional).
        pageClassName={string} // ClassName add to page buttons (optional).
        onPageChanged={function} // Callback that receivce the page number that has been clicked.
        mobileViewHideClass{string} // class used to hide the mobile view. default: d-sm-none
        desktopViewHideClass{string} // class used to hide the desktop view. default: d-none d-sm-flex
    />
```

## Defaults

--Titles

You can pass any number of the properites to override the default page button content.

```
 titles = {
    first: <FontAwesomeIcon icon={faAngleDoubleLeft} />,
    prev: <FontAwesomeIcon icon={faAngleLeft} />,
    next: <FontAwesomeIcon icon={faAngleRight} />,
    last: <FontAwesomeIcon icon={faAngleDoubleRight} />,
    prevSet: <>...</>,
    nextSet: <>...</>,
};
```

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