Docs
Table

Table

A responsive table data component.

Installation

npx rrf-shadcn-ui@latest add table-data

Usage

import { ColumnDef } from "@tanstack/react-table"
import { TableData } from "@repo/shared/components/Table"
const columns: ColumnDef<Post>[] = [
  {
    accessorKey: "title",
    header: "Title",
  },
]
 
export function PostTable() {
  return (
    <TableData
      pagination={await list(searchParams)}
      paginate={paginate} columns={columns}
    />
  )
}

Important

Copy to src/types the file pagination.ts