Pagination
stableNavigation bar matching DataTable pagination: page controls, rows-per-page selector, and total row count.
Basic usage
243 total rows
Page 3 of 10
Examples
With rows-per-page selector
Pass onPageSizeChange to show the rows-per-page dropdown alongside navigation.
389 total rows
Page 1 of 16
Standard pagination bar
Matches the DataTable pagination: First/Prev/Next/Last buttons, page dropdown, rows-per-page selector, and total row count.
389 total rows
Page 3 of 16
Features
- First / prev / next / last buttons.
- Page dropdown and rows-per-page selector.
- Total row count display.
Installation
bash
pnpm dlx structyl add paginationAPI Reference
Pagination
Full-featured pagination bar matching the DataTable pagination.
| Prop | Type | Default |
|---|---|---|
| page | numberCurrent page (1-based). | — |
| pageCount | numberTotal number of pages. | — |
| pageSize | numberCurrent page size (default 10). | — |
| totalRows | numberTotal row count shown on the left. | — |
| onPageChange | (page: number) => voidCalled on page navigation. | — |
| onPageSizeChange | (size: number) => voidCalled on page size change. If omitted the rows-per-page selector is hidden. | — |
| pageSizeOptions | number[]Options for the rows-per-page selector (default [10, 25, 50, 100]). | — |
| showTotalRows | booleanShow the total row count label (default true). | — |