Examples
Basic
| Prop | Default | Type | Description |
|---|---|---|---|
total | 0 | number | The total number of items in your list. |
defaultPage | 1 | number | The value of the page that should be active when initially rendered. Use when you do not need to control the value state. |
disabled | false | boolean | When true, prevents the user from interacting with item. |
itemsPerPage | 10 | number | Number of items per page. |
page | - | number | The controlled value of the current page. Can be binded as v-model:page. |
showEdges | false | boolean | When true, always show first page, last page, and ellipsis. |
Sibling Count
| Prop | Default | Type | Description |
|---|---|---|---|
siblingCount | 2 | number | The number of surrounding pages displayed around the current page. |
Visibility
| Prop | Default | Type | Description |
|---|---|---|---|
showFirst | true | boolean | Displays the first page button. |
showLast | true | boolean | Displays the last page button. |
showPrev | true | boolean | Displays the previous page button. |
showNext | true | boolean | Displays the next page button. |
showListItem | true | boolean | Displays the list items. |
Size
| Prop | Default | Type | Description |
|---|---|---|---|
size | sm | string | Adjusts the size of the entire pagination. |
firstPageSize | sm | string | Customizes the size of the first page button. |
lastPageSize | sm | string | Customizes the size of the last page button. |
prevPageSize | sm | string | Customizes the size of the previous page button. |
nextPageSize | sm | string | Customizes the size of the next page button. |
listItemSize | sm | string | Customizes the size of the page list items. |
ellipsisSize | sm | string | Customizes the size of the ellipsis indicator. |
By default, the size prop applies to height, width, padding, and font size. If you only want to change the size of the button, use the square prop. Refer to the Button square section for more information.
Variant and Color
| Prop | Default | Type | Description |
|---|---|---|---|
pagination-selected | solid-primary | {variant}-{color} | The color of the selected page. |
pagination-unselected | outline-gray | {variant}-{color} | The color of the unselected page. |
pagination-ellipsis | text-black | {variant}-{color} | The color of the ellipsis. |
Rounded
Sub Components
| Prop | API reference | Description |
|---|---|---|
_pagination-list-item | Reka Pagination ListItem API | Customizes the pagination list item component. |
_pagination-prev | Reka Pagination Prev API | Customizes the previous page navigation button. |
_pagination-next | Reka Pagination Next API | Customizes the next page navigation button. |
_pagination-first | Reka Pagination First API | Customizes the first page navigation button. |
_pagination-last | Reka Pagination Last API | Customizes the last page navigation button. |
_pagination-ellipsis | Reka Pagination Ellipsis API | Customizes the ellipsis indicator in the pagination. |
_pagination-list | Reka Pagination List API | Customizes the pagination list component. |
_pagination-info | Page meta | Customizes the page info text. |
_pagination-rows-per-page | Page meta | Customizes the rows-per-page select. |
Slots
| Name | Props | Description |
|---|---|---|
first | - | Customizes the first page navigation button. |
last | - | Customizes the last page navigation button. |
prev | - | Customizes the previous page navigation button. |
next | - | Customizes the next page navigation button. |
list-item | item, page | Customizes the pagination list item component. |
ellipsis | - | Customizes the ellipsis indicator in the pagination. |
start | - | Region before the page list. Holds the page meta and rows-per-page control. |
end | - | Region after the page list. |
start and end sit inside the root but outside the page list, so their
content is not announced as part of it. They are named for logical order, so
they follow the reading direction under RTL. The root only becomes a flex row
when one of them actually renders — a pagination without regions lays out
exactly as it did before.
The regions take anything. Here start holds NPaginationInfo, its scoped
slot rewording the range, and end holds a button:
Page meta
Two opt-in parts render into the start region. Both default to false, so
an existing NPagination renders exactly what it did before.
| Prop | Default | Type | Description |
|---|---|---|---|
showInfo | false | boolean | Render NPaginationInfo. |
showRowsPerPage | false | boolean | Render NPaginationRowsPerPage. |
_paginationInfo | {} | object | Props for the info part. |
_paginationRowsPerPage | {} | object | Props for the rows-per-page control. |
Info
NPaginationInfo renders where the reader is as text.
| Prop | Default | Type | Description |
|---|---|---|---|
format | page | page, range or total | Page 1 of 5, Showing 1–10 of 50 or 50 items. |
page, pageCount, total, itemsPerPage | - | number | Standalone fallbacks; read from context inside NPagination. |
range and total need total, which is optional on the root, so both fall
back to the page form when it is absent. For any other wording — or another
language, since the built-in strings are English — its default slot exposes
page, pageCount, total, itemsPerPage, first and last. The page is
clamped into 1…pageCount before anything is rendered, so a page size that
shrinks the page count never prints an impossible range.
Rows per page
NPaginationRowsPerPage wraps NSelect over a list of page sizes.
| Prop | Default | Type | Description |
|---|---|---|---|
pageSizes | [10, 20, 30, 40, 50] | number[] | The sizes to offer. |
label | - | string | Caption rendered before the select. Also available as a slot. |
itemsPerPage | - | number | Standalone fallback; read from context inside NPagination. |
@update:itemsPerPage | - | number | Emitted with the chosen size. |
Every other NSelect prop passes through — _selectTrigger, placeholder,
disabled and so on. Inside NPagination it writes back through
v-model:items-per-page.
itemsPerPage is a plain prop on the underlying primitive, so :items-per-page
keeps working as before; v-model:items-per-page is additive and is what the
rows-per-page control needs in order to write back. When the page size grows
enough to shrink the page count, the current page is clamped into the new range
for you.
Both parts also work on their own, outside NPagination, by passing the values
they would otherwise read from context: