# react-paginate-x

> A bare-bones React component for pagination UI that doesn't require CSS.

Latest version **1.0.2** (published 2018-07-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-paginate-x
pnpm add react-paginate-x
yarn add react-paginate-x
bun add react-paginate-x
```

## 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.0.2 |
| Published | 2018-07-16 |
| First published | 2018-04-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 236.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Kennedy Rose |
| Maintainers | ken85rose, suhay, tbaustin |
| Keywords | react, paginate, x |

## Links

- npm: https://www.npmjs.com/package/react-paginate-x
- Repository: https://github.com/escaladesports/react-paginate-x
- Homepage: https://github.com/escaladesports/react-paginate-x#readme
- Issues: https://github.com/escaladesports/react-paginate-x/issues
- npm.io page: https://npm.io/package/react-paginate-x

## Dependencies (1)

- [ultimate-pagination](https://npm.io/package/ultimate-pagination.md) ^1.0.0

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2018-07-16
- 1.0.0 — 2018-04-23

## README

# react-paginate-x

A bare-bones React component for pagination UI that doesn't require CSS.

## Install

With npm:

```bash
npm install --save react-paginate-x
```

Or with Yarn:

```bash
yarn add react-paginate-x
```

## Usage

```jsx
import Pagination from 'react-paginate-x'

...

<Pagination currentPage={1} totalPages={50} />
```

To use with the default or a custom link element:

```jsx
<Pagination
	link={(n, text) => (
		<a href={`/page/${n}`}>{text}</a>
	)}
	currentPage={1}
	totalPages={50} />
```

Or to use with an onClick handler:

```jsx
<Pagination
	onClick={n => console.log('Go to page', n)}
	currentPage={1}
	totalPages={50} />
```

## Options

Property | Description | Type | Default
--- | --- | --- | ---
currentPage | The current page | Number | `1`
totalPages | Total number of pages | Number | `undefined`
link | A function that creates the element for links | Function | `undefined`
previous | Contents of the previous link | String or Boolean | `"previous"`
next | Contents of the next link | String or Boolean | `"next"`
first | Contents of the first link | String or Boolean | `false`
last | Contents of the last link | String or Boolean | `false`
breakDelimiter | Contents of the page breaks | String or Component | `"..."`
boundaryPagesRange | Number of pages on the edges | Number | `2`
siblingPagesRange | Number of pages next to active page | Number | `2`
hideInactive | Hides the first, last, previous, or next links when active | Boolean | `true`

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