Pagination
Navigate between pages of a table or data grid using numbered controls.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
page | number | — | 1-based controlled page. |
defaultPage | number | 1 | Uncontrolled initial page. |
pageCount | number | — | Total number of pages. |
onChange | (page: number) => void | — | Called with the new page number. |
maxButtons | number | 7 | Max numbered buttons before collapsing to ellipses. |
Examples
PageButton
Pagination is built from PageButton — the individual numbered button, with a current flag for the active page. Use it directly to build a custom pager.
import { Pagination, PageButton } from "@solarius/onset";