Skip to content

Pagination API

The API documentation of the Pagination React component. Learn more about the props and the CSS customization points.

Import

import Pagination from '@material-ui/lab/Pagination';
// or
import { Pagination } from '@material-ui/lab';

You can learn more about the difference by reading this guide.

Props

Name Type Default Description
boundaryCount number Number of always visible pages at the beginning and end.
children node Pagination items.
classes object Override or extend the styles applied to the component. See CSS API below for more details.
color 'default'
| 'primary'
| 'secondary'
The active color.
count number The total number of pages.
defaultPage number The page selected by default when the component is uncontrolled.
disabled bool If true, all the pagination component will be disabled.
getItemAriaLabel func Accepts a function which returns a string value that provides a user-friendly name for the current page.

Signature:
function(type?: string, page: number, selected: bool) => string
type: The link or button type to format ('page'
hideNextButton bool If true, hide the next-page button.
hidePrevButton bool If true, hide the previous-page button.
onChange func Callback fired when the page is changed.

Signature:
function(event: object, page: number) => void
event: The event source of the callback.
page: The page selected.
page number The current page.
renderItem func Render the item.

Signature:
function(params: object) => ReactNode
params: null
shape 'round'
| 'rounded'
The shape of the pagination items.
showFirstButton bool If true, show the first-page button.
showLastButton bool If true, show the last-page button.
siblingRange number Number of always visible pages before and after the current page.
size 'small'
| 'medium'
| 'large'
The size of the pagination component.
variant 'text'
| 'outlined'
The variant to use.

The ref is forwarded to the root element.

Any other props supplied will be provided to the root element (native element).

CSS

  • Style sheet name: MuiPagination.
  • Style sheet details:
Rule name Global class Description
root .MuiPagination-root Styles applied to the root element.

You can override the style of the component thanks to one of these customization points:

If that's not sufficient, you can check the implementation of the component for more detail.

Demos