Pagination API
API documentation for the React Pagination component. Learn about the available props, and the CSS API.
Import
import Pagination from '@material-ui/core/Pagination';
// or
import { Pagination } from '@material-ui/core';
Component name
The nameMuiPagination
can be used when providing default props or style overrides in the theme.Props
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 API below for more details. | |
color | 'primary' | 'secondary' | 'standard' | string | 'standard' | The active color. |
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. 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. | |
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. Signature: function(event: object, page: number) => void event: The event source of the callback. page: The page selected. | |
page | integer | The current page. | |
renderItem | func | (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. |
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 | 'large' | 'medium' | 'small' | string | 'medium' | The size of the component. |
sx | 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.Any other props supplied will be provided to the root element (native element).
CSS
Rule name | Global class | Description |
---|---|---|
root | .MuiPagination-root | Styles applied to the root element. |
ul | .MuiPagination-ul | Styles applied to the ul element. |
outlined | .MuiPagination-outlined | Styles applied to the root element if variant="outlined" . |
text | .MuiPagination-text | Styles applied to the root element if variant="text" . |
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.