Skip to content

Pagination

Page list with ellipsis, first/last always visible, and edges that disable themselves instead of linking nowhere.

Middle of many

<Pagination page={2} total={12} href={(n) => `/components/pagination?page=${n}`} />

First page

<Pagination page={1} total={12} href={(n) => `/components/pagination?page=${n}`} />

Live demo

Click a number: the page reloads with ?page=N in the address bar.

Props

PropTypeDefaultDescription
pagenumber-Current page (1-based, clamped).
totalnumber-Total pages.
href(n) => string-Link builder per page.
prevLabel / nextLabelstringPrevious / NextEdge labels.

Accessibility