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 true , the component is disabled. |
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. For localization purposes, you can use the provided translations. |
hideNextButton | bool | false | If true , hide the next-page button. |
hidePrevButton | bool | false | If true , hide the previous-page button. |
onChange | func | - | Callback fired when the page is changed. |
page | integer | - | The current page. Unlike TablePagination , which starts numbering from 0 , this pagination starts from 1 . |
renderItem | func | (item) => <PaginationItem {…item} /> | Render the item. |
shape | ‘circular’ | ‘rounded’ | ‘circular’ | The shape of the pagination items. |
showFirstButton | bool | false | If true , show the first-page button. |
showLastButton | bool | false | If true , show the last-page button. |
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. |
variant | ‘outlined’ | ‘text’ | string | ‘text’ | The variant to use. |
The ref
is forwarded to the root element.
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:
styleOverrides
property in a custom theme.If you did not find the information in this page, consider having a look at the implementation of the component for more detail.