Pagination

Page navigation control across data tables, lists, and editorial documentation supporting numeric pages, simple compact status, and article card variants.

// Plain markup
import { Pagination } from "@shavin/ui";

Numeric Page Numbers (Default)

Current Page: 3 of 10
Component Source
const [page, setPage] = useState(3);

<Pagination page={page} totalPages={10} onPageChange={setPage} />

Simple / Compact Status

Component Source
<Pagination variant="simple" page={page} totalPages={5} onPageChange={setPage} />

Cards Variant (Doc / Content Navigation)

Component Source
<Pagination
  variant="cards"
  prevTitle="Foundations Overview"
  nextTitle="Typography Overview"
/>

Props Specification

PropTypeDefaultDescription
pagenumber1Current active page (1-indexed). Default 1.
totalPagesnumber1Total number of pages. Default 1.
onPageChange(page: number) => void—Callback fired when a page is selected.
prevLabelstringPreviousCustom label for previous button/link. Default "Previous".
nextLabelstringNextCustom label for next button/link. Default "Next" or "Up next".
prevTitlestring—Title text for previous item (used in "cards" variant).
nextTitlestring—Title text for next item (used in "cards" variant).
prevHrefstring—Href link for previous card/button (optional, enables link mode).
nextHrefstring—Href link for next card/button (optional, enables link mode).
variant"numeric" | "simple" | "cards""numeric"—
size"sm" | "md" | "lg""md"—
Configure Theme
Theme
Accent Color
Custom
Gray Family
Appearance
Radius
Scaling
Panel Style
Heading Font
Body Font