Skip to Content
ComponentsPagination

Pagination

Pagination helps users navigate through multiple pages of content.

Import

import { Pagination } from "@raydenui/ui";

Usage

Basic

<Pagination currentPage={1} totalPages={10} onPageChange={(page) => setPage(page)} />

Different Page Positions

With Sibling Count

<Pagination currentPage={5} totalPages={20} siblingCount={2} onPageChange={(page) => setPage(page)} />

Controlled

const [page, setPage] = useState(1); <Pagination currentPage={page} totalPages={10} onPageChange={setPage} />

Props

PropTypeDefaultDescription
currentPagenumber—Current active page (required)
totalPagesnumber—Total number of pages (required)
onPageChange(page: number) => void—Page change handler (required)
siblingCountnumber1Pages shown on each side of current
boundaryCountnumber1Pages shown at start/end
showPrevNextbooleantrueShow prev/next buttons
classNamestring—Additional CSS classes

Accessibility

  • Uses <nav> with aria-label="Pagination"
  • Current page marked with aria-current="page"
  • Prev/Next buttons have proper labels
  • Keyboard navigation support
Last updated on