Skip to content

Pagination ​

Pagination moves through a list or table. The active page is a solid brand fill with brand-on text, the same language as a primary Button. In Chinese this component is 分頁器, so it does not share the Tabs name 分頁.

Demos ​

Basic

Inactive pages are transparent and pick up an 18% brand wash on hover. The current page uses aria-current="page".

Many pages

Ellipsis keeps the first page, the last page, and the pages around the current one. The total reads from item-count. The size picker and quick jumper match the control height.

Sizes

sm / md / lg are 28 / 34 / 40, the same scale as Button.

Disabled

disabled mutes the bar and sets aria-disabled. End buttons are also disabled when there is no previous or next page.

Controlled

update:page and change carry { page }. update:page-size carries { pageSize } and the page resets to 1. Arrow keys move the page when focus is on a page button.

Page 5, 10 / page

API ​

Pagination Props ​

PropTypeDefault
pagenumber1
page-sizenumber10
item-countnumber—
page-countnumber—
page-sizesnumber[][10, 20, 30, 50]
show-size-pickerbooleanfalse
show-quick-jumperbooleanfalse
show-totalbooleanfalse
size'sm' | 'md' | 'lg''md'
disabledbooleanfalse
page-slotnumber7

When item-count is set, the page count is ceil(item-count / page-size). Otherwise page-count is used. page is clamped to 1…pageCount. page-sizes accepts a comma list or a JSON array.

Pagination Events ​

EventDetail
update:page{ page: number }
change{ page: number }
update:page-size{ pageSize: number }

Changing the page size resets the page to 1 and emits update:page when the page actually changes.

CSS Parts ​

PartDescription
rootnav landmark
navPage button group
item / item-activeNumbered page
prev / nextChevron buttons
ellipsisStatic …
size-pickerPage-size select
quick-jumperGo-to field
totalTotal text

Accessibility ​

  • The landmark label follows the document language: “Pagination” or 「分頁器」. Set aria-label on the host to override it.
  • The active page has aria-current="page".
  • Previous / next are labeled. Disabled controls set aria-disabled="true".
  • The quick jumper input has its own label.