--- layout: default title: "The Pagination Component" storybook_path: ra-ui-materialui-list-pagination--basic --- # `` By default, the `` uses the `` component for pagination. This component displays buttons to navigate between pages, including buttons for the surrounding pages. ## Usage By decorating this component, you can create your own variant with a different set of perPage options. ```jsx // in src/MyPagination.js import { Pagination } from 'react-admin'; const PostPagination = () => ; ``` Then, to use this component instead of the default ``, use the `` prop: ```jsx import { List } from 'react-admin'; import PostPagination from './PostPagination'; export const PostList = () => ( }> ... ); ``` ## `rowsPerPage` The `` component renders a dropdown allowing users to select how many rows to display per page. You can customize the options of this dropdown by passing a `rowsPerPageOptions` prop. ```jsx // in src/MyPagination.js import { Pagination } from 'react-admin'; const PostPagination = () => ; ``` **Tip**: Pass an empty array to `rowsPerPageOptions` to disable the rows per page selection. ## Infinite Scroll On mobile devices, the `` component is not very user-friendly. The expected user experience is to reveal more records when the user scrolls to the bottom of the list. This UX is also useful on desktop, for lists with a large number of records. To achieve this, you can use the `` component instead of the `` component. ```diff import { - List, + InfiniteList, DataTable, DateField } from 'react-admin'; const BookList = () => ( - + - + ); ``` `` uses a special pagination component, ``, which doesn't display any pagination buttons. Instead, it displays a loading indicator when the user scrolls to the bottom of the list. But you cannot use this `` inside a regular `` component. For more information, see [the `` documentation](./InfiniteList.md).