Pagination

Composable page-number navigation. Combine PaginationFirst/Last/Previous/Next with PaginationItem and PaginationEllipsis to build any layout.

Simple

Just previous, a few pages, and next — no edges or ellipsis.

Dark previewReplay previewOpen in new tab

Usage

Import the parts you need from the component's folder.

ts
import {
  Pagination,
  PaginationContent,
  PaginationFirst,
  PaginationLast,
  PaginationPrevious,
  PaginationNext,
  PaginationItem,
  PaginationEllipsis,
} from "@/components/ui/pagination";

Default

Number bar with prev/next, first/last, and ellipsis for long ranges.

Dark previewReplay previewOpen in new tab

With edges

showEdges keeps the first and last page visible even on long ranges.

Dark previewReplay previewOpen in new tab

Controlled

Bind v-model:page to a ref so the active page is reflected outside the component.

Dark previewReplay previewOpen in new tab

Current page: 1

Icons only

Override the previous/next slots with a bare chevron and use size icon page buttons for a compact bar.

Dark previewReplay previewOpen in new tab

API Reference

Pagination

PropTypeDefaultDescription
pagenumber1Current page. Supports v-model.
totalnumber0Total number of items.
itemsPerPagenumber10How many items per page.
siblingCountnumber1Sibling pages around the current page.
showEdgesbooleanfalseAlways show first and last page numbers.
EventDescription
update:pageFires when the page changes. Enables v-model:page.
SlotDescription
defaultScoped slot exposing { page, pageCount } to build the content row.

PaginationContent / PaginationItem

PropTypeDefaultDescription
valuenumber—(PaginationItem) Page number this button selects. Content lays out the items.

PaginationFirst / PaginationPrevious / PaginationNext / PaginationLast

PropTypeDefaultDescription
classstring—Edge navigation buttons. Default slot overrides the icon. Forwards to reka-ui.

PaginationEllipsis

PropTypeDefaultDescription
classstring—Placeholder shown where page numbers are collapsed.