Skip to content

Pagination

Shows links between pages of results.

pagination-basic-demo.tsx

Installation

The CLI adds the files, packages, theme variables, and Tailwind plugin that this component uses. Before you run it, set up your project.

Composition

  • Pagination
    • PaginationList
      • PaginationItemRepeats
        • PaginationLink
        • PaginationEllipsis

          Use it in place of a link.

URL-synced pages

Keep the page in the URL, so the Back button and shared links work. RouterProvider sends link presses to your router.

  • Item 1
  • Item 2
  • Item 3
pagination-demo.tsx

Sizes

Use sm or xs below a dense table.

pagination-sizes-demo.tsx

API reference

Pagination

size: "xs" | "sm" | "md" | "lg" | "xl" = "md"
Uses the Button heights for each link and the ellipsis. Set it on Pagination or on one PaginationLink.
aria-label: string = "Pagination"
Names the navigation landmark. Change it when a page has more than one pagination.

PaginationLink

href: string
The URL of the page. Without it, handle onPress to change the page.
isCurrent: boolean = false
Shows the link as the current page and sets aria-current="page". The current-page marker glides to the new link.
isDisabled: boolean = false
Keeps the link visible but stops navigation. The link leaves the Tab order.
onPress: (event: PressEvent) => void
Called when the link is pressed.
size: "xs" | "sm" | "md" | "lg" | "xl"
Sets the size of this link. Without it, the link uses the size of the Pagination, or md.