Skip to content

Pagination ​

Brief Introduction ​

The Pagination component is used for paginated data display, improving user experience. You can use <MYPagination></MYPagination> or <MYPagination /> to implement a pagination component.

Basic Paginator ​

Basic Paginator
展开代码

Full Color Customization ​

Full Color Customization
Combine all color customization props to achieve a fully custom look
Go to
展开代码

API Reference ​

Props ​

PropDescriptionTypeOptionsDefault
totalTotal number of data itemsnumber—0
pageSizeNumber of items per pagenumber—10
currentPageCurrent page numbernumber—1
maxPagerCountMaximum number of page buttons displayednumber—7
layoutLayout of pagination componentsstring—'prev, pager, next'
pageSizesOptions for items per pagenumber[]—[]
backgroundWhether to add background color to page buttonsboolean—false
smallWhether to use small pagination styleboolean—false
hideOnSinglePageWhether to hide pagination when only one pageboolean—false
disabledWhether to disable the pagination componentboolean—false
prneColorBackground color of prev/next buttonsstringHex or named color''
prneTextColorText color of prev/next buttonsstringHex or named color''
itemColorBackground color of page buttonsstringHex or named color''
itemTextColorText color of page buttonsstringHex or named color''
activeItemColorBackground color of active page buttonstringHex or named color''
activeItemTextColorText color of active page buttonstringHex or named color''

Type Definitions ​

typescript
interface PaginationProps {
  total?: number;
  pageSize?: number;
  currentPage?: number;
  maxPagerCount?: number;
  layout?: string;
  pageSizes?: number[];
  background?: boolean;
  small?: boolean;
  hideOnSinglePage?: boolean;
  disabled?: boolean;
  prneColor?: string;
  prneTextColor?: string;
  itemColor?: string;
  itemTextColor?: string;
  activeItemColor?: string;
  activeItemTextColor?: string;
}

Released under the MIT License.