Components · Navigation
Pagination
StableAdded v0.0.1
Page navigation control with prev/next and page number buttons.
import { Pagination } from '@nexub/react';Playground
Props
<Pagination page={page} onPageChange={setPage} pageSize={10} totalItems={100} />Examples
Default
Large dataset
States
defaultdisabled
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| pagerequired | number | — | The currently active page (1-indexed). |
| totalItemsrequired | number | — | Total number of items across all pages. |
| pageSize | number | 20 | Number of items per page. Used to calculate total page count. |
| siblingCount | number | 1 | Number of page buttons to show on each side of the current page. |
| onPageChangerequired | (page: number) => void | — | Callback invoked with the new page number when the user navigates. |
| disabled | boolean | false | Disables all pagination controls. |
On iOS & Android
Web only
Pagination has no @nexub/react-native twin. On phones, follow the platform pattern instead, or compose it from the native components listed on the React Native page.