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

Import

import Pagination from '@mui/material/Pagination';
// or
import { Pagination } from '@mui/material';

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 classes 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' | 'start-ellipsis' | 'end-ellipsis'). 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, page: number) => void
  • event The event source of the callback.
  • page The page selected.
pageinteger-

The current page. Unlike TablePagination, which starts numbering from 0, this pagination starts from 1.

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 classes

These class names are useful for styling with CSS. They are applied to the component's slots when specific states are triggered.

Class nameRule nameDescription
.MuiPagination-outlinedoutlinedStyles applied to the root element if variant="outlined".
.MuiPagination-rootrootStyles applied to the root element.
.MuiPagination-texttextStyles applied to the root element if variant="text".
.MuiPagination-ululStyles applied to the ul element.

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