Components/Navigation

Pagination

Pagination lets a reader move through a long list one page at a time. It shows where they are in the run and how much of it there is, so a list too long to show at once stays something they navigate deliberately rather than by scrolling and hoping.

import { Pagination } from '@growth-protocol-ai/alpha';

On this page

Pagination.tsxtsx
1import { Pagination } from '@growth-protocol-ai/alpha';
2
3<Pagination aria-label="Report pages" count={12} defaultPage={4} />

When to use

Reach for pagination when the run has a known end and the reader benefits from knowing how far into it they are — a table of results, an archive, a report split across pages. Put one below the rows it pages and let the numbers carry the whole job; the habit that most often goes wrong is a second copy above the list, because two controls reporting one position are only ever in step by accident.

When not to use

Do not reach for it where the run has no end to pin. A cursor-backed feed or a stream has no last page, so there is nothing to draw, and what that wants is a Button the reader presses to fetch more. The subtler mistake is Tabs, which also swaps what is shown from a row of clickable items — the difference is that a tab is a named place the reader chooses between, where a page is a position in one long thing they are working through. If the items have names rather than numbers, they are tabs.