React Native · Components
Pagination
Pagination: numbered buttons, previous/next, a compact view or "show more".
Live example
The preview runs in the browser with the web component; the native component takes the same props and looks the same on iOS and Android.
Preview
Code
Events
- Events appear here when you interact with the preview.
In a table: sorting + page size + summary (Table pagination)
| Orders | Status | ||
|---|---|---|---|
| #4200 | Ayşe Yılmaz | Paid | $120.00 |
| #4201 | Mehmet Kaya | Returned | $3,239.00 |
| #4202 | Zeynep Demir | Paid | $1,558.00 |
| #4203 | Can Şahin | Paid | $4,677.00 |
| #4204 | Elif Çelik | Pending | $2,996.00 |
| #4205 | Emre Ak | Paid | $1,315.00 |
| #4206 | Ayşe Yılmaz | Paid | $4,434.00 |
| #4207 | Mehmet Kaya | Paid | $2,753.00 |
| #4208 | Zeynep Demir | Pending | $1,072.00 |
| #4209 | Can Şahin | Paid | $4,191.00 |
1–10 of 137
Your own grid: usePagination, scrolls to the top of the list on change
Product 1
Product 2
Product 3
Product 4
Product 5
Product 6
Product 7
Product 8
1–8 of 58
Cursor API, total unknown: useCursorPagination
Show more (variant="more"), async
Narrow card: compact, pick by searching across 10,000 pages
Archive
Linked: Next.js server component, page from the URL (?page=)
A table paged on the server; pages are real links, the filter parameter is kept,
on the first page ?page=1 isn't written.
Simple, with text: previous / next
Import
Pagination
componentPagination: numbered buttons, previous/next, a compact view or "show more". The page calculations are the same as web (@yasinsensoy/core/pagination); the button count stays fixed when the page changes, so nothing slides out from under the finger. Touch areas are at least 44 px.
Examples
Look of the pagination (same as web).
pages: numbered page buttons with…in the gaps.simple: only previous / next and "Page 3 / 12".compact: arrows with "3 / 12" in the middle.more: a "Show more" button (instead of an infinite list).
PaginationProps
interfaceProps of Pagination.
| Name | Type | Default | Description |
|---|---|---|---|
page? | number | The current page (controlled, starts at 1). | |
defaultPage? | number | 1 | Initial page. |
onPageChange? | (page: number) => unknown | When the page changes; if it returns a Promise the button spins until it finishes. | |
total? | number | Total records; the page count is computed with pageSize. | |
pageCount? | number | Total pages (instead of total). | |
hasNext? | boolean | false | When the total is unknown (cursor APIs), whether there is a next page. |
pageSize? | number | 10 | Records per page. |
variant? | PaginationVariant | "pages" | Variant. |
siblings? | number | 1 | Number of pages on each side of the current page. |
boundaries? | number | 1 | Pages always visible at the start and end. |
firstLast? | boolean | false | First / last page buttons. |
summary? | boolean | ((info: PageInfo) => ReactNode) | Record range summary ("1–20 of 245"); needs total. | |
size? | Size | "md" | Button size. |
activeVariant? | "solid" | "soft" | "outline" | "solid" | Style of the selected page. |
align? | "start" | "center" | "end" | "between" | "center" | Alignment. |
hideOnSinglePage? | boolean | false | Not drawn at all when there is a single page. |
disabled? | boolean | Disabled. | |
label? | string | {@link UIProvider} `pages` text | Screen reader name. |
style? | StyleProp<ViewStyle> | Container style. |