Pagination
Navigation for a paginated list or table with page numbers and prev/next controls.
Show codeHide code
Installation
import { Pagination } from "@makeplane/propel/components/pagination";Usage
import { Pagination } from "@makeplane/propel/components/pagination";
import * as React from "react";
export default function BasicDemo() {
const [page, setPage] = React.useState(1);
return <Pagination page={page} pageCount={25} onPageChange={setPage} />;
}Examples
With selector and range
Pass pageSize to add the per-page selector and range to show the 1-50 of 250 label before the controls; both are optional.
Show codeHide code
Truncation
The visible page window is derived from where the current page sits within pageCount — first and last are always anchored, and runs of two or more skipped pages collapse to an ellipsis.
Show codeHide code
Empty state
When there’s nothing to page through (pageCount is 0 or 1), prefer not rendering Pagination
at all. If pageCount is 0, the control still renders safely — no page-number button, both
arrows disabled — rather than showing a stray “page 1”.
Loading
Set loading to render the current page as a spinner while navigating to it is in flight.
Show codeHide code
Labels
labels overrides the default English accessible names (landmark, prev/next, page buttons) and the selector’s visible text — pass any subset; the rest keep their defaults.
Show codeHide code
API Reference
Pagination
Page navigation for a paginated list or table. Renders a `<nav>` landmark holding an optional per-page selector and range label plus an ordered list of page controls: a previous button, first/last anchors with ellipses around a window of pages near the current one, and a next button. The current page is marked `aria-current="page"`; the prev/next ends disable at the bounds and their arrows mirror under RTL.