Pagination
Bounded page navigation, even for very large result sets.
Interactive preview
Showing page 1 of 12
Usage
import { Pagination } from "@devvy-ui/react";
<Pagination page={2} count={12} getHref={page => "?page=" + page} />API reference
Native HTML attributes, className, style and a forwarded ref are supported. Component-specific props:
| Prop | Type | Default | Description |
|---|---|---|---|
| page / count | number / number | required | Current page and total pages; finite integer normalization. |
| onPageChange OR getHref | callback OR link builder | required | Choose button state or real route links. |
| label | string | Pagination | Navigation landmark name. |
Accessibility & behavior
Platform Behavior & Guidelines
Only edges and nearby pages are rendered. Native buttons/links keep normal keyboard behavior. Current page has aria-current; unavailable previous/next controls cannot activate. Zero pages shows an empty state. Provide onPageChange for state mode; link mode does not intercept navigation.
Source ownership
Run npx @devvy-ui/cli init once in your React project, then add the source:
npx @devvy-ui/cli add paginationMake the source yours.
Start from the canonical implementation used by the package and registry. Change the code, keep the MIT notice, and build the behavior your project needs.
Edit your own copy. Downloaded source uses your changes; the component preview above uses the shipped version. Run the source installer first to include shared helpers.