For AI agents: the complete documentation index is available at https://wallarm.github.io/design-system/llms.txt, the full documentation bundle is available at https://wallarm.github.io/design-system/llms-full.txt, and this page is available as Markdown at https://wallarm.github.io/design-system/components/pagination.md.

Pagination

Page-through navigation for a bounded set — previous and next, numbered pages with automatic ellipsis, and an optional rows-per-page selector. Infinite scroll is the house default for long data, so this is the deliberate alternative: reach for it when knowing and controlling your position genuinely helps — jumping to a page, coming back to page two, choosing a page size. “Lots of rows” on its own is not the cue. It is compound, so render only the parts you want, in the order you want.

Source · Storybook

Usage

import { Pagination, PaginationList, PaginationNext, PaginationPrevious } from '@wallarm-org/design-system/Pagination';

Examples

Simple

Numbers only. Fine where the reader is scanning to a known page rather than stepping through.

Previous and next with no numbers, for a set whose page count means nothing to the reader.

With page size

PaginationPageSize puts rows-per-page in the same row. Offering it is the strongest reason to choose pagination over infinite scroll.

Sizes

medium and small. Small is the one to use in a Table footer, where the pager should not outweigh the data.

Alignment

align places the row left, centre or right — right for a table footer, centre for a standalone list.

Many pages

siblingCount and boundaryCount decide how much of a 50-page set stays visible; the ellipsis is inserted for you.

Playground

Controlled mode with both page and pageSize held outside, which is how it behaves against a real query.

In table

The pager below a Table, sharing its state through useClientPagination — the composition to copy for a paged grid.

Props

PropTypeDefaultDescription
countnumber | undefinedTotal number of data items (Ark count).
pagenumber | undefinedControlled current page (1-based).
defaultPagenumber | undefinedUncontrolled initial page.
pageSizenumber | undefinedControlled items-per-page.
defaultPageSizenumber | undefinedUncontrolled initial items-per-page.
siblingCountnumber | undefinedPages shown beside the active page.
boundaryCountnumber | undefinedPages shown at the start/end.
onPageChange((details: PaginationPageChangeDetails) => void) | undefined
onPageSizeChange((details: PaginationPageSizeChangeDetails) => void) | undefined
type"button" | "link" | undefinedTrigger element type.
getPageUrl((details: PaginationPageChangeDetails) => string) | undefined
sizePaginationSize | undefinedmediumVisual size.
alignPaginationAlign | undefinedleftHorizontal alignment of the row.
aria-labelstring | undefined
data-testidstring | undefined

PaginationEllipsis

PropTypeDefaultDescription
index *numberIndex of this ellipsis within the pages array (required by Ark).
defaultCheckedboolean | undefined
defaultValuestring | number | readonly string[] | undefined
autoFocusboolean | undefined
idstring | undefined
tabIndexnumber | undefined
titlestring | undefined
relstring | undefined
onChangeChangeEventHandler<T, Element> | undefined

PaginationItem

PropTypeDefaultDescription
value *number1-based page number.
disabledboolean | undefined
namestring | undefined
type"button" | "submit" | "reset" | undefined
defaultCheckedboolean | undefined
defaultValuestring | number | readonly string[] | undefined
autoFocusboolean | undefined
idstring | undefined
tabIndexnumber | undefined
titlestring | undefined
relstring | undefined
onChangeChangeEventHandler<T, Element> | undefined

PaginationNext

PropTypeDefaultDescription
disabledboolean | undefined
namestring | undefined
type"button" | "submit" | "reset" | undefined
valuestring | number | readonly string[] | undefined
defaultCheckedboolean | undefined
defaultValuestring | number | readonly string[] | undefined
autoFocusboolean | undefined
idstring | undefined
tabIndexnumber | undefined
titlestring | undefined
relstring | undefined
onChangeChangeEventHandler<T, Element> | undefined

PaginationPageSize

PropTypeDefaultDescription
options *number[]Selectable items-per-page values.
labelstring | undefinedPAGINATION_PAGE_SIZE_LABELLeading label.
data-testidstring | undefined

PaginationPrevious

PropTypeDefaultDescription
disabledboolean | undefined
namestring | undefined
type"button" | "submit" | "reset" | undefined
valuestring | number | readonly string[] | undefined
defaultCheckedboolean | undefined
defaultValuestring | number | readonly string[] | undefined
autoFocusboolean | undefined
idstring | undefined
tabIndexnumber | undefined
titlestring | undefined
relstring | undefined
onChangeChangeEventHandler<T, Element> | undefined

Explorer