Pagination

Page controls that collapse long ranges to the first page, the last page and the current page's neighbours.

Examples

Long range

Page 5 of 10

Show code
<Pagination pages={10} bind:page />

Short range

Show code
<Pagination pages={3} page={2} />

Props

PropTypeDefaultDescription
pagesnumber—Total number of pages. Renders nothing when there is one.
pagenumber1Current page. Bind it with bind:page.

The current page is the only ink-filled control and is exposed with aria-current="page". Pass aria-label to localize the landmark.