sigilUI

Pagination

A page navigation component with previous/next buttons, numbered pages, and ellipsis truncation.

@sigil-ui/componentsReact

Preview

Live preview Interactive

Import

import { Pagination } from "@sigil-ui/components";

Usage

<Pagination currentPage={2} totalPages={10} onPageChange={setPage} />

With ellipsis

<Pagination currentPage={5} totalPages={20} siblingCount={1} />

Button variant

Use onClick instead of href for SPA routing:

<PaginationLink onClick={() => setPage(3)}>3</PaginationLink>

Token integration

CSS VariableUsed for
--s-surface-elevatedActive page background
--s-primaryActive page accent
--s-textPage number color
--s-text-mutedEllipsis and disabled color
--s-borderItem border
--s-radius-mdItem border radius
--s-duration-fastHover transition

Props

Pagination

PropTypeDefaultDescription
currentPagenumber—Active page, one-indexed
totalPagesnumber—Total available pages
onPageChange(page: number) => void—Called when a page is selected
siblingCountnumber1Page buttons shown around the active page

Accessibility

  • Uses <nav> with aria-label="Pagination"
  • Active page marked with aria-current="page"
  • Previous/Next buttons have aria-label text