For the complete documentation index, see llms.txt. Markdown variants are available by appending .md to any URL or sending an Accept: text/markdown header. An agent skill is available at /.well-known/agent-skills/site-skill.md.
/
0
Sponsor

Data Table

Tabular data with columns and rows.

Installation

$ pnpm dlx shadcn@latest add @pdfcn/takumi/data-table

Usage

import { DataTable } from "@/components/pdf/data-table";
<DataTable
  columns={[{ key: "name", header: "Name" }]}
  data={[{ name: "Widget" }]}
/>

Variants

Use any TableVariant for the table treatment and size="compact" for denser reports.

<DataTable columns={columns} data={rows} variant="striped" size="compact" />

API Reference

DataTable

PropTypeDefault
columnsDataTableColumn<T>[]-
dataT[]-
variant'line' | 'grid' | 'minimal' | 'striped' | 'compact' | 'bordered' | 'primary-header''grid'
footerPartial<Record<keyof T, string | number>>-
stripebooleanfalse
size'default' | 'compact''default'
noWrapbooleanfalse
styleStyle-

DataTableColumn

key is the row-field accessor—for example, key: "name" reads row.name. It is not React's reserved key prop.

PropTypeDefault
keykeyof T & string-
headerstring-
align'left' | 'center' | 'right''left'
widthstring | number-
render(value, row) => ReactNode-
renderFooter(value) => ReactNode-