Pagination

A pagination nav with Prev and Next buttons that disable at the edges and numbered page buttons that mark the current page with aria-current. Built in React.

src/registry/ui/pagination.tsx/r/pagination.json

Installation#

bash
npx shadcn@latest add @minidev/pagination

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/pagination.json

Usage#

tsx
import { Pagination } from "@/components/ui/pagination"

export function Example() {
  return (
    <Pagination page={page} pageCount={5} onPageChange={setPage} />
  )
}

API reference#

Pagination props
PropTypeDefault
page*number-
pageCount*number-
onPageChange*(p: number) => void-
classNamestring-

* required

Dependencies#

npm

React only

Built from

Examples#

All navigation components

Learn more