structyl

Pagination API

View component

The full prop reference for the Pagination component. Navigation bar matching DataTable pagination: page controls, rows-per-page selector, and total row count.

Import

tsx
import { Pagination } from '@structyl/styled';

Props

Pagination

A data-table pagination component with page navigation, rows-per-page selector, and total row count display. Supports both page selection and page size configuration.

PropTypeDefault
page#number

Current page number (1-based), required

pageCount#number

Total number of pages, required

pageSize#number

Current page size (rows per page)

10
totalRows#number | undefined

Total row count shown on the left

onPageChange#(page: number) => void

Called when the user navigates to a different page, required

onPageSizeChange#((pageSize: number) => void) | undefined

Called when the user changes the page size; if omitted the rows-per-page selector is hidden

pageSizeOptions#number[]

Options for the rows-per-page selector

[10, 25, 50, 100]
showTotalRows#boolean

Show the 'X total rows' label (only visible when totalRows is provided)

true
className#string | undefined

Additional CSS classes applied to the root div

Pagination.Root

Headless primitive pagination component with basic page navigation. Extends HTML nav element. This is the low-level primitive; most users should use the styled Pagination component instead.

PropTypeDefault
current#number | undefined

Current page number (1-based)

1
total#number | undefined

Total number of pages

1
onChange#((page: number) => void) | undefined

Called when the user navigates to a different page

className#string | undefined

Additional CSS classes

Source code

If you didn't find what you need here, read the component implementation .

structyl — Accessible React Component Library