Skip to content

Pagination

SPagination is page navigation for large lists. It is built on Reka UI (page calculation from total/itemsPerPage, sibling pages, ellipsis, keyboard control). The buttons are reused SButtons, the arrows are SIcons. The current page is bound with v-model:page.

Basic usage

Edge pages

show-edges always shows the first and last pages with an ellipsis between the blocks — useful for long lists.

Custom arrows

prev-icon and next-icon replace the icons of the "previous"/"next" buttons — they take a registry name or a raw SVG path. Here the chevrons are replaced with arrows.

Sibling pages

sibling-count sets how many pages to show to the left and right of the current one. A larger value shows more page numbers around the active page.

Disabled

disabled blocks the pagination and all its buttons.

API

Props

NameTypeDefaultDescription
total*numberrequiredTotal number of items; the page count is computed from it and itemsPerPage.
items-per-pagenumber10Number of items per page.
sibling-countnumber1How many sibling pages to show on each side of the current one.
show-edgesbooleanfalseAlways shows the first and last pages with an ellipsis between the blocks.
disabledbooleanfalseDisables the pagination and all its buttons.
prev-iconstring"chevron-left"Icon of the previous page button.
next-iconstring"chevron-right"Icon of the next page button.
prev-page-labelstringundefinedAccessible name of the previous page button (taken from the locale dictionary by default).
next-page-labelstringundefinedAccessible name of the next page button (taken from the locale dictionary by default).
pagenumber1Current page (1-based). Two-way binding via v-model:page.

Events

NameSignatureDescription
update:page(value: number) => voidEmitted when page changes. Used for two-way binding (v-model:page).