Table Pagination

Table pagination footer showing Page X of Y with previous and next icon buttons that disable at the first and last page. Wire it to onPageChange in React.

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

Installation#

bash
npx shadcn@latest add @minidev/table-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/table-pagination.json

Usage#

tsx
import { TablePagination } from "@/components/ui/table-pagination"

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

API reference#

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

* required

Dependencies#

npm

lucide-react

Built from

Examples#

All data table components

Learn more