Saltar al contenido

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';
// o
import { Pagination } from '@material-ui/core';
You can learn about the difference by reading this guide on minimizing bundle size.

Component name

The name MuiPagination can be used when providing default props or style overrides in the theme.

Props

NombreTipoPor defectoDescripción
boundaryCountnumber1Number of always visible pages at the beginning and end.
classesobjectOverride or extend the styles applied to the component. See CSS API below for more details.
color'primary'
| 'secondary'
| 'standard'
'standard'The active color.
countnumber1The total number of pages.
defaultPagenumber1The page selected by default when the component is uncontrolled.
disabledboolfalseIf true, the accordion is displayed in a disabled state.
getItemAriaLabelfuncAccepts a function which returns a string value that provides a user-friendly name for the current page.
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.
hideNextButtonboolfalseIf true, hide the next-page button.
hidePrevButtonboolfalseIf true, hide the previous-page button.
onChangefuncCallback fired when the page is changed.

Signature:
function(event: object, page: number) => void
event: The event source of the callback.
page: The page selected.
pagenumberThe current page.
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.
showFirstButtonboolfalseIf true, show the first-page button.
showLastButtonboolfalseIf true, show the last-page button.
siblingCountnumber1Number of always visible pages before and after the current page.
size'large'
| 'medium'
| 'small'
'medium'The size of the autocomplete.
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 nameGlobal classDescripción
root.MuiPagination-rootStyles applied to the root element.
ul.MuiPagination-ulStyles applied to the ul element.
outlined.MuiPagination-outlinedStyles applied to the root element if variant="outlined".
text.MuiPagination-textStyles applied to the root element if variant="text".

You can override the style of the component using one of these customization options: If that isn't sufficient, you can check the implementation of the component for more detail.

Demos