Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

shadcn-data-tables

verified

This skill should be used when the user asks about "data table", "tanstack table", "sortable table", "filterable table", "table pagination", "column sorting", "row selection", or mentions building data tables, grids, or TanStack Table integration with shadcn.

View on GitHub

Marketplace

functional-claude

nthplusio/functional-claude

Plugin

shadcn-dev

Repository
Verified Org

nthplusio/functional-claude

plugins/shadcn-dev/skills/shadcn-data-tables/SKILL.md

Last Verified

February 2, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/nthplusio/functional-claude/blob/main/plugins/shadcn-dev/skills/shadcn-data-tables/SKILL.md -a claude-code --skill shadcn-data-tables

Installation paths:

Claude
.claude/skills/shadcn-data-tables/
Powered by add-skill CLI

Instructions

# shadcn/ui Data Tables

Build powerful data tables with TanStack Table and shadcn/ui components.

## Setup

### Install Dependencies

```bash
npm install @tanstack/react-table
npx shadcn@latest add table
```

### Basic Structure

Data tables consist of:
1. **Column definitions** - Define columns and their behavior
2. **Table instance** - TanStack Table hook
3. **Render** - shadcn Table components

## Basic Data Table

### 1. Define Columns

```tsx
// columns.tsx
"use client"

import { ColumnDef } from "@tanstack/react-table"

export type Payment = {
  id: string
  amount: number
  status: "pending" | "processing" | "success" | "failed"
  email: string
}

export const columns: ColumnDef<Payment>[] = [
  {
    accessorKey: "status",
    header: "Status",
  },
  {
    accessorKey: "email",
    header: "Email",
  },
  {
    accessorKey: "amount",
    header: "Amount",
    cell: ({ row }) => {
      const amount = parseFloat(row.getValue("amount"))
      const formatted = new Intl.NumberFormat("en-US", {
        style: "currency",
        currency: "USD",
      }).format(amount)
      return <div className="font-medium">{formatted}</div>
    },
  },
]
```

### 2. Create DataTable Component

```tsx
// data-table.tsx
"use client"

import {
  ColumnDef,
  flexRender,
  getCoreRowModel,
  useReactTable,
} from "@tanstack/react-table"

import {
  Table,
  TableBody,
  TableCell,
  TableHead,
  TableHeader,
  TableRow,
} from "@/components/ui/table"

interface DataTableProps<TData, TValue> {
  columns: ColumnDef<TData, TValue>[]
  data: TData[]
}

export function DataTable<TData, TValue>({
  columns,
  data,
}: DataTableProps<TData, TValue>) {
  const table = useReactTable({
    data,
    columns,
    getCoreRowModel: getCoreRowModel(),
  })

  return (
    <div className="rounded-md border">
      <Table>
        <TableHeader>
          {table.getHeaderGroups().map((headerGroup) => (
            <TableRow key={headerGroup.id}>
              {headerGroup.headers.map((header) 

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
7980 chars