Pagination
Display active page and navigate between multiple pages
Source
LLM docs
Docs
Package
Usage
Example with chunked content
id: 0, name: mantine-m57o4x2jm
id: 1, name: mantine-6gbxst5xr
id: 2, name: mantine-zot5i4ebo
id: 3, name: mantine-hflc3r5a6
id: 4, name: mantine-oyjsh8nim
Controlled
To control the component state, provide value and onChange props:
Siblings
Control the number of active item siblings with the siblings prop:
1 sibling (default)
2 siblings
3 siblings
Boundaries
Control the number of items displayed after previous and before next buttons with the boundaries prop:
1 boundary (default)
2 boundaries
3 boundaries
Hide pages controls
Set withPages={false} to hide the pages controls:
Showing 1 – 10 of 145
Styles API
Pagination supports the Styles API; you can add styles to any inner element of the component with the classNames prop. Follow the Styles API documentation to learn more.
Component Styles API
Hover over selectors to highlight corresponding elements
Compound components
You can use the following compound components to have full control over the Pagination rendering:
Pagination.Root– context providerPagination.Items– items listPagination.Next– next controlPagination.Previous– previous controlPagination.First– first controlPagination.Last– last control
Controls as links
Change icons
autoContrast
Pagination supports the autoContrast prop and theme.autoContrast. If autoContrast is set either on Pagination or on the theme, the content color will be adjusted to have sufficient contrast with the value specified in the color prop.
Note that the autoContrast feature works only if you use the color prop to change the background color.
autoContrast: off
autoContrast: on
Controls size
By default, pagination controls have reduced size compared to inputs and buttons.
If you want controls to have the same size as inputs and buttons, you can use input- prefix for the size prop:
Start value
Set startValue to define the starting page number. For example, with startValue={5} and total={15},
the pagination range will be from 5 to 15:
Pages 5–15 (startValue=5, total=15)
URL synchronization
You can synchronize pagination state with URL query parameters. This pattern is commonly used for list views where you want to share the URL with a specific page selected.
Next.js
react-router-dom
nuqs
Example using nuqs:
use-pagination hook
If you need more flexibility, the @mantine/hooks package exports the use-pagination hook.
You can use it to create custom pagination components.