shadcn-impl-data-table

Installation
SKILL.md

shadcn ui : DataTable Recipe (TanStack Table v8)

Deterministic mental model for the shadcn DataTable. There is NO DataTable primitive in shadcn. The official recipe (https://ui.shadcn.com/docs/components/radix/data-table) composes @tanstack/react-table v8 with the shadcn Table primitive. ALWAYS treat DataTable as a recipe-skill, not a primitive-skill : you write a reusable components/ui/data-table.tsx file in user space.

Quick Reference

One mental model

A DataTable is three concerns wired together :

  1. Schema : a ColumnDef<TData, TValue>[] array describes columns (accessor + header + cell).
  2. Headless engine : useReactTable({ data, columns, getCoreRowModel, ... }) returns a table instance.
  3. Markup : a <DataTable /> component renders the shadcn <Table> primitive driven by table.getHeaderGroups() and table.getRowModel().rows.

ALWAYS pass getCoreRowModel: getCoreRowModel() or the table renders ZERO rows. ALWAYS mark the DataTable component file "use client" ; the headless engine uses React hooks and breaks under server-rendering.

Install

Installs
1
First Seen
9 days ago
shadcn-impl-data-table — openaec-foundation/shadcn-ui-claude-skill-package