navigation / stable
Pagination
A shared table and list footer with a range, page numbers and container-aware compact navigation.
LIVE PREVIEW
Loading preview…
When to use
- Finite result sets in tables and lists.
- Server pagination with a known total.
Consider an alternative
- Infinite scrolling without a known total.
Import
import { Pagination } from '@revido-llc/kit';Keyboard interaction
- Tab — focus page controls
- Enter / Space — change pages
- Arrow keys — choose rows per page in the Select
Props
Props documented by the Kit. Refer to the TypeScript types for the complete interface, including inherited props.
Related exports
CursorPagination
Examples
Numbered pages
<Pagination total={120} page={page} onPageChange={setPage} pageSize={pageSize} onPageSizeChange={setPageSize} pageSizeOptions={[10, 25, 50]} itemLabel="tasks" />Compact
<Pagination total={50} defaultPage={2} compact itemLabel="tasks" />Selection
<Pagination total={50} selectedCount={selected.length} onClearSelection={() => setSelected([])} />One URL update
Use the atomic callback when page and pageSize share URL state; preserve other query parameters.
<Pagination total={total} page={page} pageSize={pageSize} pageSizeOptions={[10, 25, 50]}
onPaginationChange={(next) => {
const params = new URLSearchParams(searchParams);
params.set("page", String(next.page));
params.set("pageSize", String(next.pageSize));
replaceUrl(params.toString());
}} />Cursor windows
Only the application knows cursor availability; no page count is inferred. Pending disables both controls.
<CursorPagination hasPrevious={history.length > 0} hasNext={result.hasMore} onPrevious={loadPrevious} onNext={loadNext} isPending={pending} summary={`${rows.length} gaps in this window`} previousLabel="Previous gaps" nextLabel="Next gaps" />