Skip to content

Pagination

@astryxdesign/core v0.7.1 · Pagination

<Pagination
  :page="3"
  variant="pages"
  size="md"
/>

Pagination Props ​

NameTypeDefaultDescription
pagenumber1Current page, starting at 1.
pageSizenumber10Items per page.
totalnumber0Total number of items.
totalItemsnumber—Total number of items, the original name for total. Wins over total and totalPages when both are set.
labelstringPagination / 分页Accessible name of the navigation landmark.
showSizeChangerbooleanfalseShows the page-size selector.
pageSizeOptionsnumber[][10, 20, 50, 100]Page-size choices.
showTotalbooleanfalseShows the total count.
isDisabledbooleanfalseDisables the control.
disabledbooleanfalseOlder name of isDisabled. Either one disables the control.
prevLabelstringPrevious / 上一页Previous-page label. English by default; Chinese when zh-CN is provided.
nextLabelstringNext / 下一页Next-page label. English by default; Chinese when zh-CN is provided.
pageSizeLabelstringPer page / 每页Label for the page-size selector. English by default; Chinese when zh-CN is provided.
variant'pages' | 'count' | 'compact' | 'dots' | 'input' | 'none''pages'Middle of the control. input is an editable page field.
siblingCountnumber1How many page buttons sit on each side of the current page. Narrow containers drop another step.
stepnumber1How many pages previous and next move.
hasMoreboolean—Whether another page exists when the total is unknown. A total above 0 wins.
pageLabelstringPage / 页Noun in front of the input field.
hasFirstLastbooleaninput when the page count is knownShows buttons that jump to the first and last page.
changeAction(page: number) => void | Promise<void>—Runs after the page is committed. The control stays busy until it settles, and a failure does not roll the page back.

Pagination events ​

NamePayloadDescription
update:pagepage: numberEmitted when the page changes.
update:pageSizepageSize: numberEmitted when the page size changes.
pageSizeChangepageSize: numberEmitted when the page size changes, before the page returns to the first one.
changepage: number, pageSize: numberEmitted when the page or page size changes.

Pagination slots ​

NamePropsDescription
total{ total, from, to }Custom total label.