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 of the native component are also available.
Name | Type | Default | Description |
---|---|---|---|
boundaryCount | integer | 1 | Number of always visible pages at the beginning and end. |
classes | object | - | 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. |
count | integer | 1 | The total number of pages. |
defaultPage | integer | 1 | The page selected by default when the component is uncontrolled. |
disabled | bool | false | If |
getItemAriaLabel | func | - | 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. Signature: function(type: string, page: number | null, selected: boolean) => string
|
hideNextButton | bool | false | If |
hidePrevButton | bool | false | If |
onChange | func | - | Callback fired when the page is changed. Signature: function(event: React.ChangeEvent
|
page | integer | - | The current page. Unlike |
renderItem | func | (item) => <PaginationItem {...item} /> | Render the item. Signature: function(params: PaginationRenderItemParams) => ReactNode
|
shape | 'circular' | 'rounded' | 'circular' | The shape of the pagination items. |
showFirstButton | bool | false | If |
showLastButton | bool | false | If |
siblingCount | integer | 1 | Number of always visible pages before and after the current page. |
size | 'small' | 'medium' | 'large' | string | 'medium' | The size of the component. |
sx | Array<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. |
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.
These class names are useful for styling with CSS. They are applied to the component's slots when specific states are triggered.
Class name | Rule name | Description |
---|---|---|
.MuiPagination-outlined | outlined | Styles applied to the root element if variant="outlined" . |
.MuiPagination-root | root | Styles applied to the root element. |
.MuiPagination-text | text | Styles applied to the root element if variant="text" . |
.MuiPagination-ul | ul | Styles applied to the ul element. |
You can override the style of the component using one of these customization options:
- With a global class name.
- With a rule name as part of the component's
styleOverrides
property in a custom theme.
Source code
If you did not find the information in this page, consider having a look at the implementation of the component for more detail.