rc-pagination

pagination ui component for react

rc-pagination downloads rc-pagination version rc-pagination license

rc-paginationSimilar Packages:
Npm Package Weekly Downloads Trend
3 Years
🌟 Show real-time usage chart on rc-pagination's README.md, just copy the code below.
## Usage Trend
[![Usage Trend of rc-pagination](https://npm-compare.com/img/npm-trend/THREE_YEARS/rc-pagination.png)](https://npm-compare.com/rc-pagination#timeRange=THREE_YEARS)
Cumulative GitHub Star Trend
🌟 Show GitHub stars trend chart on rc-pagination's README.md, just copy the code below.
## GitHub Stars Trend
[![GitHub Stars Trend of rc-pagination](https://npm-compare.com/img/github-trend/rc-pagination.png)](https://npm-compare.com/rc-pagination)
Stat Detail
Package
Downloads
Stars
Size
Issues
Publish
License
rc-pagination2,097,891673166 kB5610 months agoMIT
README for rc-pagination

rc-pagination

React Pagination Component.

NPM version npm download build status Codecov bundle size dumi

Development

npm install
npm start

Examples

Online example: https://pagination-react-component.vercel.app Local example: npm run start then http://localhost:9001

Install

rc-pagination

Usage

import Pagination from 'rc-pagination';

ReactDOM.render(<Pagination />, container);

API

// prettier-ignore

ParameterDescriptionTypeDefault
disableddisable paginationBool-
alignalign of paginationstart | center | endundefined
defaultCurrentuncontrolled current pageNumber1
currentcurrent pageNumberundefined
totalitems total countNumber0
defaultPageSizedefault items per pageNumber10
pageSizeitems per pageNumber10
onChangepage change callbackFunction(current, pageSize)-
showSizeChangershow pageSize changerboolean | SelectPropsfalse when total less than totalBoundaryShowSizeChanger, true when otherwise
totalBoundaryShowSizeChangerwhen total larger than it, showSizeChanger will be truenumber50
pageSizeOptionsspecify the sizeChanger selectionsArray['10', '20', '50', '100']
onShowSizeChangepageSize change callbackFunction(current, size)-
hideOnSinglePagehide on single pageBoolfalse
showPrevNextJumpersshow jump-prev, jump-nextBooltrue
showQuickJumpershow quick goto jumperBool / Objectfalse / {goButton: true}
showTotalshow total records and rangeFunction(total, [from, to])-
classNameclassName of paginationString-
simplewhen set, show simple pagerBool / { readOnly?: boolean; }-
localeto set l10n configObjectzh_CN
stylethe style of paginationObject{}
showLessItemsshow less page itemsBoolfalse
showTitleshow page items titleBooltrue
itemRendercustom page item rendererFunction(current, type: 'page' | 'prev' | 'next' | 'jump-prev' | 'jump-next', element): React.ReactNode | (current, type, element) => element
prevIconspecify the default previous iconReactNode | (props: PaginationProps) => ReactNode
nextIconspecify the default next iconReactNode | (props: PaginationProps) => ReactNode
jumpPrevIconspecify the default previous iconReactNode | (props: PaginationProps) => ReactNode
jumpNextIconspecify the default next iconReactNode | (props: PaginationProps) => ReactNode

License

rc-pagination is released under the MIT license.