Skip to content

Browse components

← All components

Pagination

Pagination controls with previous, next, and page links.

Install
npx shadcn@latest add https://ui.anuragroy.dev/r/pagination.json

Preview

Loading preview…

Installation

Add the component from this site. The shadcn CLI fetches the registry JSON over HTTPS — no named registry submission required.

Terminal
npx shadcn@latest add https://ui.anuragroy.dev/r/pagination.json

GitHub fallback if the website is down:

Terminal
npx shadcn@latest add https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/pagination.json

Usage

Import paths follow your components.json aliases. After install, the default path is @/components/ui/pagination.

Import
import {  Pagination,  PaginationContent,  PaginationEllipsis,  PaginationItem,  PaginationLink,  PaginationNext,  PaginationPrevious} from "@/components/ui/pagination"
example.tsx
import {  Pagination,  PaginationContent,  PaginationEllipsis,  PaginationItem,  PaginationLink,  PaginationNext,  PaginationPrevious,} from "@/components/ui/pagination"export function Example() {  return (    <Pagination>      <PaginationContent>        <PaginationItem>          <PaginationPrevious href="#" />        </PaginationItem>        <PaginationItem>          <PaginationLink href="#" isActive>1</PaginationLink>        </PaginationItem>        <PaginationItem>          <PaginationEllipsis />        </PaginationItem>        <PaginationItem>          <PaginationNext href="#" />        </PaginationItem>      </PaginationContent>    </Pagination>  )}

API Reference

PaginationLink

PropTypeDefault
isActiveboolean—
sizeButton size—
hrefstring—
  • size — Forwards to the underlying button styles.