Pagination

Page navigation: previous/next, optional first/last, page numbers with ellipses; the number of items stays constant so it does not jump.

Source on GitHub

Page 10 of 20

Code

API

For AI agents: this API as Markdown, or every component in llms-full.txt.

<ray-pagination> · RayPagination

JS: setPage(n), next(), previous(), first(), last(); page (clamped value).

PropertyAttributeTypeDefaultDescription
totaltotalnumber1Number of pages.
valuevaluenumber1Current page (1-based).
siblingssiblingsnumber1Pages shown on each side of the current one.
boundariesboundariesnumber1Pages always shown at the start and the end.
withEdgeswith-edges reflectsbooleanAdds first/last page buttons.
hideControlshide-controls reflectsbooleanHides the previous/next (and first/last) buttons.
colorcolor reflectsstringColor of the current page: a palette color or any CSS color. Default: the primary color.
sizesize reflectsxs | sm | md | lg | xlsmItem size.
radiusradiusxs | sm | md | lg | xl | fullCorner radius of the items.
disableddisabled reflectsbooleanNot interactive.
labellabelstringPagination (text pagination.label)Accessible name of the navigation landmark.
EventDescription
changeThe user went to another page (read `value`).
PartDescription
rootThe <nav> landmark.
listThe list of items.
itemEvery button (pages and controls).
activeThe current page button.
controlPrevious/next/first/last buttons.
dotsAn ellipsis.

Texts

What it writes itself, in English; setStrings() translates them (Getting started: Languages).

KeyEnglish
pagination.labelPagination
pagination.previousPrevious page
pagination.nextNext page
pagination.pagePage {page}