Skip to content

Pagination API

API reference docs for the React Pagination component. Learn about the props, CSS, and other APIs of this exported module.

Demos

For examples and details on the usage of this React component, visit the component demo pages:

Import

import Pagination from '@mui/material/Pagination';
// or
import { Pagination } from '@mui/material';
You can learn about the difference by reading this guide on minimizing bundle size.

Props

Props of the native component are also available.

NameTypeDefaultDescription
boundaryCountinteger1
Number of always visible pages at the beginning and end.
classesobject
Override or extend the styles applied to the component. See CSS API below for more details.
color'primary'
| 'secondary'
| 'standard'
| string
'standard'
The active color. It supports both default and custom theme colors, which can be added as shown in the palette customization guide.
countinteger1
The total number of pages.
defaultPageinteger1
The page selected by default when the component is uncontrolled.
disabledboolfalse
If true, the component is disabled.
getItemAriaLabelfunc
Accepts a function which returns a string value that provides a user-friendly name for the current page. This is important for screen reader users.
For localization purposes, you can use the provided translations.

Signature:
function(type: string, page: number, selected: bool) => string
type: The link or button type to format ('page' | 'first' | 'last' | 'next' | 'previous'). Defaults to 'page'.
page: The page number to format.
selected: If true, the current page is selected.
hideNextButtonboolfalse
If true, hide the next-page button.
hidePrevButtonboolfalse
If true, hide the previous-page button.
onChangefunc
Callback fired when the page is changed.

Signature:
function(event: React.ChangeEvent<unknown>, page: number) => void
event: The event source of the callback.
page: The page selected.
pageinteger
The current page.
renderItemfunc(item) => <PaginationItem {...item} />
Render the item.

Signature:
function(params: PaginationRenderItemParams) => ReactNode
params: The props to spread on a PaginationItem.
shape'circular'
| 'rounded'
'circular'
The shape of the pagination items.
showFirstButtonboolfalse
If true, show the first-page button.
showLastButtonboolfalse
If true, show the last-page button.
siblingCountinteger1
Number of always visible pages before and after the current page.
size'small'
| 'medium'
| 'large'
| string
'medium'
The size of the component.
sxArray<func
| object
| bool>
| func
| object
The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.
variant'outlined'
| 'text'
| string
'text'
The variant to use.

The ref is forwarded to the root element.

Theme default props

You can use MuiPagination to change the default props of this component with the theme.

CSS

The following class names are useful for styling with CSS (the state classes are marked).
To learn more, visit the component customization page.

Rule nameGlobal classDescription
root.MuiPagination-rootStyles applied to the root element.
ul.MuiPagination-ulStyles applied to the ul element.
outlined.MuiPagination-outlinedStyles applied to the root element if variant="outlined".
text.MuiPagination-textStyles applied to the root element if variant="text".

You can override the style of the component using one of these customization options: