Pagination
A page-number control with previous/next buttons and a windowed page range (with ellipses) for large page counts.
Playground
…
…
<Pagination
page={10}
pageCount={20}
siblingCount={1}
onChange={setPage}
/>
Small page count
<Pagination page={page} pageCount={5} onChange={setPage} />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
page | number | Required. Current page (1-indexed). | |
pageCount | number | Required. Total number of pages. | |
onChange | (page: number) => void | Required. Called with the pressed page number. | |
siblingCount | number | 1 | How many page numbers to show around the current page. |
activeColor | TVajraColors | 'primary' | Background of the current page's cell. |
inactiveColor | TVajraColors | 'text' | Text/icon color of other cells and controls. |
prevIcon | TVajraIconComponent | Previous-page icon. Defaults to a plain ‹ glyph. | |
nextIcon | TVajraIconComponent | Next-page icon. Defaults to a plain › glyph. |