React Pagination Component.
npm install
npm start
Online example: https://pagination-react-component.vercel.app
Local example: npm run start
then http://localhost:9001
import Pagination from 'rc-pagination';
ReactDOM.render(<Pagination />, container);
// prettier-ignore
| Parameter | Description | Type | Default |
| --- | --- | --- | --- |
| disabled | disable pagination | Bool | - |
| align | align of pagination | start | center | end | undefined |
| defaultCurrent | uncontrolled current page | Number | 1 |
| current | current page | Number | undefined |
| total | items total count | Number | 0 |
| defaultPageSize | default items per page | Number | 10 |
| pageSize | items per page | Number | 10 |
| onChange | page change callback | Function(current, pageSize) | - |
| showSizeChanger | show pageSize changer | boolean | SelectProps | false
when total less than totalBoundaryShowSizeChanger
, true
when otherwise |
| totalBoundaryShowSizeChanger | when total larger than it, showSizeChanger
will be true | number | 50 |
| pageSizeOptions | specify the sizeChanger selections | Array(current, type, element) => element
| |
| prevIcon | specify the default previous icon | ReactNode | (props: PaginationProps) => ReactNode | |
| nextIcon | specify the default next icon | ReactNode | (props: PaginationProps) => ReactNode | |
| jumpPrevIcon | specify the default previous icon | ReactNode | (props: PaginationProps) => ReactNode | |
| jumpNextIcon | specify the default next icon | ReactNode | (props: PaginationProps) => ReactNode | |
rc-pagination is released under the MIT license.