1.2.0 • Published 5 years ago

react-pag v1.2.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

React Pagination Component

NPM version Build Status npm download

Simple pagination component for use with React.

You can view an online example in http://amadormf.github.io/react-pag/

Install

npm install --save react-pag

Example

<Pagination
  totalResults={100}
  resultsPerPage={10}
  urlPattern="search"
/>

The result of this code is:

example

Props

Props NameTypeDefaultDescription
totalResultsNumberNumber of results for paginate
resultsPerPageNumberNumber of results per page
actualPageNumberForce the actual page of pagination
maxPaginationNumberMax number of buttons to show
onChangePageFunctionFunction to call when the page change
showBeginingEndBoolfalseShow buttons to move to the beginning and go to the end
showPreviousNextBoolfalseShow previous and next button
urlPatternStringPath to use in href of pagination, you can get more info in https://github.com/amadormf/pagination-template
preventNavigateBooltrueYou can control the navigation over pages with onChangePage, if you prefer you can give the control to navigator setting this parameter to false
classNameStringYou can use a custom className
initialPageNumber1Initial page
1.2.0

5 years ago

1.1.0

6 years ago

1.0.0

6 years ago

0.2.4

8 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago