JGuang

Pagination

Pagination · Arco Design

Preview
npm install @arco-design/web-react@2.66.18

Pagination

Use pagination to control the amount of information in a single page.

Install

npm install @arco-design/web-react@2.66.18

Import @arco-design/web-react/dist/css/arco.css at the entry and set the locale with ConfigProvider. React 19 projects must also import @arco-design/web-react/es/_util/react-19-adapter first, or imperative APIs such as Message and Modal cannot render.

Examples

  • Basic: The simplest usage.
  • More: More pages.
  • Change pageSize: The pageSize of Pagination can be changed.
  • Jump: Enter the page number to quickly jump to the specified page.
  • Size: Set size field to use different sizes.
  • Simple: When page space is limited, you can set simple to true.
  • Show Total: Set showTotal to show the total number of data.
  • Count under control: By changing the value of total, solve the situation where the total number of pages cannot be calculated.
  • Show all: Show all configuration items.
  • Customize style: Customize style to get different visual styles.
  • Previous and next: Set the itemRender to customize the pagination buttons.
  • Display length when page numbers are omitted: With bufferSize you can set the number of pages between the current page and .... An ... means at least 2 pages are omitted.

Examples come from the official Arco Design repository (MIT) at the commit published as npm 2.66.18. Some use online images or upload endpoints; network requests are disabled in previews.

API

Pagination

PropertyDescriptionTypeDefaultValueVersion
disabledWhether to disableboolean--
hideOnSinglePageWhether to hide when there is only one pageboolean-2.6.0
pageSizeChangeResetCurrentWhen pageSize changes, resets the current page number to 1booleantrue-
showJumperWhether to display quick jump. Defaults to true in simple modeboolean--
showMoreWhether to show more page number tips (can be used when the total number of data cannot be calculated yet)boolean--
simpleWhether to use simplified pagination modeboolean--
sizeCanChangeIs it possible to change page sizeboolean--
bufferSizethe number of pages between the current page and ...number22.32.0
currentCurrent pagenumber--
defaultCurrentTo set default current pagenumber--
defaultPageSizeTo set default number of data per pagenumber--
pageSizeNumber of data items per pagenumber--
totalTotal number of datanumber--
itemRenderCustomized pagination button structure(page: number,type: 'page' | 'more' | 'prev' | 'next',originElement: ReactNode) => ReactNode--
sizepager size'mini' | 'small' | 'default' | 'large'--
activePageItemStyleThe style of the selected page buttonCSSProperties--
classNameAdditional css classstring | string[]--
iconsSet icon of the pager{prev?: ReactNode;next?: ReactNode;more?: ReactNode;}--
pageItemStylePagination button styleCSSProperties--
selectPropsProps of the SelectPartial<SelectProps>--
sizeOptionsThe number of data items that can be displayed per pagenumber[]--
styleAdditional styleCSSProperties--
onChangeCallback when page changes(pageNumber: number, pageSize: number) => void--
onPageSizeChangeCallback when pageSize changes(size: number, current: number) => void--
showTotalWhether to display the total number of databoolean | ((total: number, range: number[]) => ReactNode)--