Skip to content
PreviewPage through the turn log or change how many turns appear at once.
Turn log
Turn Duration
Read the brief
1s
Find the draft
1s
Check the references
10s

Pagination

page
number
Default: 0
The current page, from 0. Out of range reads as the last page. Left out with a more foot.
pageSize
number
Default: 25
Rows per page. Left out with a more foot.
total
number
Default: 0
Every row there is, across pages. Left out with a more foot: a cursor list never knows its total.
onPageChange
(page: number) => void
Turns the page. Left out with a more foot.
pageSizes
readonly number[]
Default: [10, 25, 50]
The row-count choices; with onPageSizeChange, a "Rows" picker appears.
onPageSizeChange
(size: number) => void
noun
readonly [one: string, many: string]
Default: ["row", "rows"]
What a row is, singular and plural, for the range ("1 to 10 of 351 turns"). Default: row.
label
string
Default: "Pages"
Names the navigation landmark. Default: "Pages". A more foot draws none.
showPage
boolean
Default: true
"Page 2 of 6" between the arrows. False for a list that fits its page: the range already says where you are, and the footer keeps to one line beside a meter.
more
{ shown: number; onMore: () => void; hasMore?: boolean; loading?: boolean; label?: string; error?: ReactNode }
A cursor list, which reads one page at a time and never knows how many there are: the foot says how many rows are showing ("40 cards") and offers the one quiet control that reads more, in place of the pages. shown is how many are showing and onMore reads the next page; hasMore false takes the control away at the end, loading puts its spinner in the label's place, label names it ("Show more cards", the noun's plural), and error shows the product's own line and Try again where it stood. Leave page, pageSize, total and onPageChange out.
rootStyle
PaginationStyle
Pagination has no knobs of its own: place it with rootStyle.

Rest props go to HTMLAttributes<HTMLElement>.

State machine

PreviewPrevious is unavailable on the first page.