This is the latest docs update, but there are missing components and blocks. If you wish to see the complete version, you can check it out at old docs.

Components

Pagination

A navigation control for traversing paginated content.

Installation

NPM packages are currently unstable and may cause issues. Use it at your own risk.
npm install @mijn-ui/react-pagination

Usage

import {
  Pagination,
  PaginationContent,
  PaginationList,
  PaginationNextButton,
  PaginationNextEllipsis,
  PaginationPreviousButton,
  PaginationPreviousEllipsis,
} from @mijn-ui/react-pagination
const [currentPage, setCurrentPage] = React.useState(7)
const ItemsPerPage = 10
const TotalPage = 160
 
<Pagination
  totalPages={TotalPage}
  currentPage={currentPage}
  itemsPerPage={ItemsPerPage}
  onChangePage={setCurrentPage}
>
  <PaginationContent>
    <PaginationPreviousButton>Previous</PaginationPreviousButton>
    <PaginationPreviousEllipsis />
    <PaginationList />
    <PaginationNextEllipsis />
    <PaginationNextButton>Next</PaginationNextButton>
  </PaginationContent>
</Pagination>

Pagination Style Slots

Slot NameTargeted ComponentPurpose
basePaginationStyles the root pagination component.
contentPaginationContentStyles the content area of the pagination.
listPaginationListStyles the list container for pagination items.
listItemPaginationListStyles individual pagination items.
previousBtnPaginationPreviousButtonStyles the button for the previous page.
previousElipsisPaginationPreviousElipsisStyles the ellipsis before the previous page.
nextBtnPaginationNextButtonStyles the button for the next page.
nextElipsisPaginationNextElipsisStyles the ellipsis after the next page.

On this page