Skip to content

Pagination

In review
Live · web

Numbered: ellipsis truncation, current page in cyan (tab / click / arrow keys)

Showing 126 to 150 of 487

Compact: “Page X of Y” with prev/next; the tone prop sets the label emphasis

neutralaccent

Prev / next only: a labelled pair, disabled at the bounds

Load more: the mobile / infinite-scroll idiom (Android + Voice lists)

Loaded 25 of 487 · 462 more

Numbered page 6 of 20 · 25 rows/page · compact page 3. The island is live.

// Web: React, consuming @dizyx/nockerl-tokens. (Web is the laggard platform;
// this is the canonical API the published @dizyx/nockerl-react package exposes.)
// NockerlPagination owns ONLY the control row (prev + windowed cells + next). The rows-per-page
// selector and the "showing X to Y of Z" summary stay with the consumer. They speak the
// limit/offset/total vocabulary the apps' list endpoints already return.
import { NockerlPagination } from '@dizyx/nockerl-react';
export function TaskListFooter({ total }: { total: number }) {
const [page, setPage] = useState(1);
const pageSize = 25;
const pageCount = Math.max(1, Math.ceil(total / pageSize));
const from = (page - 1) * pageSize + 1;
const to = Math.min(page * pageSize, total);
return (
<div className="task-list-footer">
<span>Showing {from} to {to} of {total}</span>
<NockerlPagination page={page} pageCount={pageCount} onChange={setPage} siblings={1} />
</div>
);
}
PropTypeDefaultDescription
page *numberCurrent page (1-based).
pageCount *numberTotal number of pages.
onChange *(page: number) => voidCalled with the next page (already clamped to 1..pageCount).
variantNockerlPaginationVariant'numbered'numbered (default) · compact · prev-next.
siblingsnumber1How many page cells to show either side of the current page (numbered).
toneNockerlPaginationTone'neutral'Color of the compact "Page X of Y" label. 'neutral' (default) keeps the WHOLE phrase in the card text color (accent-restraint law); 'accent' tints the ENTIRE phrase cyan. Never a partial tint: the whole phrase shares one color, never a lone cyan digit. No effect on the numbered / prev-next variants.
labelstring'NockerlPagination'Accessible name for the <nav> landmark.