Prepared Docs

Prepared Docs

⌘K

    Loading navigation…

User

  1. Components
  2. Pagination
  3. API and Development

Pagination

API and Development

View Source
Submit Issue

Pagination is a controlled, table-agnostic pagination primitive. Pass page (1-indexed) and onPageChange; choose type to switch between PaginationType.Simple (default — Previous/Next, supports an unknown pageCount) and PaginationType.Numbered (chevrons plus numbered page buttons, requires a known pageCount).

Pagination

Name

Type

Default

Description

onPageChange

(page: number) => void

—

Fired with the 1-indexed target page. Not fired when the target equals the current page.

page

number

—

Current page, **1-indexed**. Clamped into range before rendering.

className

string

—

Additional CSS class name applied to the root <nav>.

hideLabel

boolean

false

Hides the Page {page} of {pageCount} label, leaving only the controls.

pageCount

number

-1

Total number of pages. Pass UNKNOWN_PAGE_COUNT (-1) or omit when the total is not known, e.g. cursor-based pagination: the label degrades to Page {page} and Next stays enabled. Total number of pages. Required — numbered pages cannot be rendered without a known total.

ref

Ref<HTMLElement>

—

Ref forwarded to the root <nav> element.

siblingCount

number

1

Not applicable to Simple; disallow usage. Page buttons rendered either side of the current page before ellipsis truncation. 1 matches the Figma spec (1 2 3 4 … 10).

type

PaginationType

PaginationType.Simple

—

Storybook

Interactive examples and edge cases for this component are in Storybook.

Default
Simple Unknown Page Count
Simple First Page
Simple Last Page
Numbered
Numbered Middle Page
Numbered Few Pages
Numbered Wide Window
Without Label
All Variations

PaginationType

Name

Type

Default

Description

Simple

"simple"

-

Previous/Next buttons. Supports an unknown total page count.

Numbered

"numbered"

-

Chevron controls plus numbered page buttons with ellipsis truncation. Requires a known pageCount.

Simple

Simple with an unknown total

Numbered

Numbered with a wider sibling window

Previous

Pagination / Usage

Next

Pagination / Accessibility

On this page

Pagination
Storybook
PaginationType
Simple
Simple with an unknown total
Numbered
Numbered with a wider sibling window