Data Table Pagination

GitHub

Pagination controls and page-size selection for TanStack data tables.

Installation

bash
pnpm dlx shadcn@latest add @cs/data-table-pagination

Usage

tsx
import { DataTablePagination } from "@/components/cs/data-table-pagination"
tsx
<DataTablePagination table={table} defaultPageSize={20} disabled={false} />

API Reference

DataTablePagination

Renders page navigation and a page-size selector for a TanStack data table.

Props

NameTypeDefaultDescription
defaultPageSize *number | undefined-Optional non-standard page size to include alongside the built-in choices.
disabled *boolean-Disables the page-size selector and all navigation controls.
table *PaginatedTable-TanStack Table instance configured with the row pagination feature.
translationsRootKeystring"table"Namespace containing count, rowsPerPage, and pageCount messages. count receives { count }; pageCount receives { pageNumber, pageCount }.