Pagination

Pagination is a horizontal set of links to navigate paginated content.

Page navigation navigation

React
readyNot reviewed for a11y

Pagination renders a list of page links that let users quickly navigate content that is split into sequential pages.

React examples

Default

Controlled

If it would be useful for users to be able to skip to a page near the beginning or end of the list, define how many page links should be shown at the beginning and end.

You can specify how many page links before or after the current page will be shown. The first and last pages will always be shown, even if you set this value to 0.

If you want to prevent users from skipping pages and force them to navigate sequentially, you may hide the page numbers and only show the previous and next page links.

Props

Pagination

NameRequiredDescription
currentPage
Required
number
The currently selected page.
pageCount
Required
number
The total number of pages.
hrefBuilder
function
A function to generate links based on page number.
marginPageCount
number
How many pages to always show at the left and right of the component.
onPageChange
function
Called with event and page number when a page is clicked.
showPages
boolean | { narrow?: boolean, regular?: boolean, wide?: boolean }
Whether or not to show the individual page links.
surroundingPageCount
number
How many pages to display on each side of the currently selected page.
sx
SystemStyleObject