Skip to content

Pagination

A navigation landmark with a page range that keeps the ends and the neighbours of the current page, as buttons or as links.

Styled with CSS Tailwind

Buttons

TotalItems and PageSize give the page count; Entries is the range to render - SiblingCount pages around the current one, BoundaryCount at each end, gaps for the rest - and it keeps the same length as the page moves, so the controls don't jump. The current page has aria-current="page"; pages are named "Page 4".

Page 7 of 23

Links

With PageHref every part is a link, so pages open in a new tab, are crawlable and work before the page is interactive. The pagination doesn't change the page itself then: bind Page to the route.

An unhandled error has occurred. Reload 🗙