Guide
Components
Pagination

Pagination Component

ℹ️

The Pagination component is a React component designed for handling and displaying paginated content. It utilizes the popular react-paginate library and provides customization options for various styles and configurations.

Example Preview

Pagination Example

Usage

ℹ️

Import the Pagination component and use it in your React application:

import { Pagination } from "@/@core";
 
const MyComponent = () => {
  const handlePageChange = (pageNumber) => {
    // Handle page change logic
    console.log(`Page changed to ${pageNumber}`);
  };
 
  return (
    <Pagination
      totalCount={50}
      showPerPage={10}
      handlePageChange={handlePageChange}
      // Additional customization props
    />
  );
};
 
export default MyComponent;

Props

Prop NameTypeDescription
totalCountnumberThe total number of items to be paginated.
showPerPagenumberThe number of items to display per page.
handlePageChangefunctionCallback function invoked when a page is selected.
variantstringPagination button style ('outlined', 'contained', 'text').
disabledbooleanDisables the pagination component.
shapestringShape of pagination buttons ('circle', 'rounded', 'square').
colorstringColor variant of pagination buttons.
sizestringSize of pagination buttons ('sm', 'md', 'lg', 'xl').

Other Props

ℹ️

Refer to the react-paginate documentation for additional configuration options: react-paginate (opens in a new tab).