1.0.0 • Published 5 years ago

simple-react-paginate v1.0.0

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

simple-react-paginate

Simple pagination component for ReactJS

Installation

Install simple-react-paginate with npm:

$ npm install simple-react-paginate --save

For CommonJS users:

import SimpleReactPaginate from "simple-react-paginate";

Props

NameTypeDescriptionDefault value
currentNumberThe initial page selected1
totalNumberThe total number of pages.1
pageRangeNumberThe range of pages displayed.5
marginRangeNumberThe number of pages to display for margins.1
hidePreviousNextBooleanHide the previous and next button.false
previousLabelNodeLabel for the previous button.previous
nextLabelNodeLabel for the next button.next
breakLabelNodeLabel for the ellipsis....
containerClassStringThe classname of the pagination container.paginate-container
pageClassStringThe classname on tag li of each page element.paginate-page
linkClassStringThe classname on tag a of each page element.paginate--link
activeClassStringThe classname for the active page.paginate-active
activeLinkClassStringThe classname on the active tag a.paginate-active-link
previousClassStringThe classname on tag li of the previous button.paginate-previous
previousLinkClassStringThe classname on tag a of the previous button.paginate-previous-link
nextClassStringThe classname on tag li of the next button.paginate-next
nextLinkClassStringThe classname on tag a of the next button.paginate-next-link
disabledClassStringThe classname for disabled previous and next buttons.paginate-disabled

Callback

CallbackTypeDescription
onChangeFunctionThe method to call when a page is clicked. Exposes the current page object as an argument.