Data Table Pagination
GitHubPagination controls and page-size selection for TanStack data tables.
Installation
bash
pnpm dlx shadcn@latest add @cs/data-table-paginationUsage
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
| Name | Type | Default | Description |
|---|---|---|---|
| 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. |
| translationsRootKey | string | "table" | Namespace containing count, rowsPerPage, and pageCount messages. count receives { count }; pageCount receives { pageNumber, pageCount }. |