Pagination

Page links: borderless, with the current page filled with the accent color.

@cupertinoui/paginationRegistry JSON

Installation

pnpm dlx shadcn@latest add @cupertinoui/pagination

The first install also adds the macOS theme. See Installation to set up the registry.

Usage

import { Pagination, PaginationContent, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "@/components/ui/pagination"

<Pagination>
  <PaginationContent>
    <PaginationItem><PaginationPrevious href="#" /></PaginationItem>
    <PaginationItem><PaginationLink href="#" isActive>2</PaginationLink></PaginationItem>
    <PaginationItem><PaginationNext href="#" /></PaginationItem>
  </PaginationContent>
</Pagination>

API Reference

Every part forwards the props of the underlying element. The props below are the ones CupertinoUI adds or changes.

PropTypeDescription
isActiveboolean
Default: false
Marks the current page.
classNamestringExtra classes, merged with the component's own.

PaginationPrevious / PaginationNext

PropTypeDescription
textstringThe label, hidden on small screens.
classNamestringExtra classes, merged with the component's own.