Pagination
Display active page and navigate between multiple pages
Import
Source
Docs
Package
Usage
Color
Size
xs
sm
md
lg
xl
Radius
xs
sm
md
lg
xl
Controlled
To control component state provide page
and onChange
props:
Siblings
Control amount of active item siblings with siblings
prop:
1 sibling (default)
2 siblings
3 siblings
Boundaries
Control amount of items displayed after previous and before next buttons with boundaries
prop:
1 boundary (default)
2 boundaries
3 boundaries
Accessibility
Pagination renders a div with the role of "navigation". Inside are regular button elements. To include aria-labels for screen reader support, you can provide an aria-label to the Pagination component itself.
To provide aria-labels to the actions inside the component, use the getItemAriaLabel
function to generate aria-labels:
The current active page will have the attribute aria-current="page"
.
use-pagination hook
If you need more flexibility @mantine/hooks exports use-pagination hook, you can use it to create your own pagination component.