Search docs

Jump to any table example

Agent skill

An agent skill for Claude Code, Cursor, Codex and any other agent that reads SKILL.md. Describe the table you need. The agent picks the block from this site that fits, installs it, and adapts it to your data, data source and UI, instead of writing a table from scratch.

Install

terminal
npx skills add coros-hq/shadcn-table-library

Or copy skills/shad-table into your project's .claude/skills/ or your agent's skills folder. Then ask for a table, for example “edit prices inline and save them to our API” or “a roles × permissions screen”.

How it works

  1. 1.Fill in a requirements card

    The agent turns your request into a short card: what people do with the table, the row type, the data shape, where rows come from and how many, the must-have interactions, your framework and TanStack Table version, and a style card of your app’s accent, selection, surfaces and density, read from its tokens and its existing screens. It reads your code for answers and asks only about what would change the pick.

  2. 2.Pick a block

    It reads the catalog of all blocks and a decision guide with tie-breaks for blocks that overlap (editing, detail views, server or client data, selection, filtering, export). Before writing code it writes a fit map: the main block, pieces borrowed from other blocks, gaps to build by hand, and features to delete.

  3. 3.Install it

    React projects get the block with the shadcn CLI, the v8 or v9 item to match your TanStack Table version. Vue and Svelte projects get the source port copied from this repo.

  4. 4.Adapt it

    Every block has the same file roles, so the agent edits in a fixed order: your type, your data source (client, server, TanStack Query or live), columns from your fields, every colour mapped to the role your app’s screens actually use (not just what the token is called), unused features deleted, gaps built in the block’s own style, and copy rewritten for your domain. No demo data is left.

  5. 5.Check it

    It runs your typecheck and lint, tries each interaction from the card, measures every colour the table paints against your app’s own screens, and covers empty, loading and error states for async data. Then it reports the fit map and what changed.

Example fit map

What the agent writes down after step 2 for one request. You can correct the pick here, before any code is written.

fit map
request: "Audit log for ~2M events in Postgres. Filter by actor,
          action and date, click an event to see its JSON."

primary:  logs-table: date range, multi-select facets, rows expand
          into the full event
add-ons:  server-combined-table: manual pagination, sorting and
          filtering wired to the API
          loading-, empty-, error-state-table: async states
gaps:     actor filter (a facet over the actor field)
dropped:  demo level and service facets, mock log data

The catalog

What the agent chooses from: every block with when to use it, its data shape, where its rows come from, and what it does.

BlockUse whenShape · data
Basics
data-tableGeneric list of records under a few thousand rows that needs sort, a search box, simple column filters and pagination. The default starting point.flat · client
Server data
server-pagination-tableLarge dataset where only paging happens on the server; URL holds the page.flat · server
server-filter-tableServer-side column filtering driven by URL state, no server sort.flat · server
server-combined-tableThe real-world server table: sort, filter and paginate resolved in one request from one URL. Reference pattern whenever any other block must go server-side.flat · server
infinite-scroll-tableLong feeds loaded page by page as the user scrolls: cursor-based hook, skeleton rows, inline retry, sticky header.flat · server
Filtering & views
deployments-tableEvent/history list (deploys, builds, runs, orders) with status badges and faceted multi-filters showing counts.flat · client
logs-tableLog or audit-event explorer: date range, multi-select level/service/status with live counts, highlighted search, rows expand into the full event.time-series · client
logs-table-side-panelLog explorer where the user inspects events one by one in a right-hand panel with keyboard stepping.time-series · client
crm-employees-tableData-dense directory of people or entities with stacked avatar cells, status badges, progress bars, currency, single-select filters and row selection.flat · client
crm-employees-multi-select-tableSame dense directory with multi-select faceted filters, live option counts, reset and density toggle.flat · client
saved-views-tablePower users switch between named views (filters, sort, visible columns, density) as tabs, like Linear or Airtable views.flat · client
Hierarchy & structure
tree-tableParent/child records of arbitrary depth (org chart, categories, accounts) with expand/collapse and search that keeps ancestors visible.tree · client
tree-table-variantsProduct catalog where a product opens a bracketed group of variant rows (size, colour), with selection and row actions.tree · client
tree-table-detail-cardEach parent has exactly one child record (order → shipment) and clicking it opens a detail card beside the table.tree · client
tree-table-selectionHierarchical checkbox picking with cascading and indeterminate parents (folders, permissions groups, category pickers).tree · client
tree-table-reorderUsers reorder items within their own parent (menu builder, outline, nested priorities).tree · client
grouped-tableFlat rows bucketed by one column value with collapsible group headers and subtotals.grouped · client
pivot-tableAd-hoc analysis: user picks the row dimension, column dimension and aggregation (sum/avg/count).matrix · client
master-detail-tableExpanding a row reveals a different related dataset as a nested sub-table (order → line items, customer → invoices).tree · client
Editing & data entry
editable-tableInline cell editing with per-cell validation, optimistic save and undo, without a data-fetching library.flat · client
spreadsheet-tableExcel-like grid: A1 headers, arrow-key navigation, range selection, type-to-edit, copy/paste, simple formulas.matrix · client
inventory-allocation-tableEditable operational grid with derived formula columns that recalc on every edit and expandable sub-allocations (stock, budgets, capacity).tree · client
permissions-matrix-tableRoles/access grid: resources as rows, actions as columns, inherited/required/unavailable checkbox states, tri-state group toggles, unsaved changes.matrix · client
realtime-collab-tableMultiplayer editing: peer cursors and selections, live incoming edits highlighted, cells locked while someone types.flat · live
schedule-matrix-tablePeople × days (or resources × slots) matrix with editable cells, coverage counts, rule conflicts, draft/publish.matrix · client
draft-rows-tableQuick batch entry: add several new rows inline, validate as you type, flag duplicates, then save or discard the batch.flat · client
query-mutations-tableInline edits persisted to an API via TanStack Query: optimistic update, per-row saving/error, rollback and retry, cache invalidation.flat · query
Review & workflow
csv-import-tableImport a CSV: map columns to fields in the header, highlight invalid cells, flag duplicates, fix or skip rows, import only valid rows.flat · client
change-review-tableReview a proposed bulk update as git-style field diffs; accept or reject per field or all.flat · client
job-queue-tableBackground jobs/tasks with live progress, attempts, backoff retries, expandable error history, retry/cancel per job.flat · live
file-browser-tableFolders and files: breadcrumb navigation, folders first, selection with total size, bulk download/delete, expandable details.tree · client
split-detail-tableQueue/inbox (tickets, leads, applications): a row opens a side panel that pushes the table aside to edit and reply, with prev/next while filters, sort, page and scroll persist.flat · client
bulk-actions-tableSelect rows and act on them together (assign, change status, delete with undo), including select-all-matching across pages.flat · client
Layout & columns
reorderable-tableUsers set row order by drag (priorities, playlist, steps).flat · client
resizable-reorderable-columns-tableUsers customize column width and order, persisted to localStorage.flat · client
column-pinning-tableWide tables where key columns stay frozen left/right while the rest scrolls horizontally.flat · client
Live & animated
animated-icons-tablePolished row actions (favorite, notify, archive, delete) with animated icons.flat · client
async-actions-tableRow actions that hit an API and must show pending, failure with retry, undo, and confirm-on-delete.flat · client
live-status-tableService health / monitoring: status and latency update on a timer, pulsing indicators, Live/Paused toggle.flat · live
Analytics & dashboards
kpi-tableCompact metric list with period-over-period change and a sparkline per row.time-series · client
comparison-tableEntities as columns, features as rows (pricing plans, product comparison) with a highlighted recommended column.matrix · client
heatmap-tableNumeric matrix where colour intensity shows magnitude (hour × weekday, region × product).matrix · client
conditional-formatting-tableRule-driven highlighting of cells/badges based on the whole row (thresholds, SLAs, risk flags).flat · client
production-dashboard-tableOperational status board: conditional formatting, progress/utilization bars and 7-day trend sparklines together.time-series · client
transactions-tableBank statement / ledger: grouped by day, debit and credit columns, running balance computed before filtering, pending excluded.ledger · client
cohort-retention-tableRetention by signup cohort × months since: one-hue heatmap, counts/percent toggle, weighted average row.matrix · client
anomaly-investigation-tableMetrics against expected ranges with spikes/drops by severity, range bar, history band chart on expand, review queue.time-series · client
anomaly-investigation-finance-tableFinance anomaly review (spend, refunds, chargebacks, revenue, cash) read as better/worse per line.time-series · client
Export & selection
density-export-tableDensity toggle plus one-click CSV/Excel export and print-to-PDF of the current view.flat · client
export-config-tableExport dialog: filter by status/region/date, pick columns and CSV or Excel, live count before download.flat · client
export-selected-tableCheckbox selection that persists across pages, select-all, export only selected rows.flat · client
States & responsive
loading-state-tableSkeleton rows matching the column layout on first load and dimmed rows during refetch. Pattern to fold into any async table.flat · server
empty-state-tableReusable EmptyState: first-use call to action and no-results-with-clear-search, inside the table body.flat · client
error-state-tableReusable ErrorState: panel when nothing loaded, banner over stale rows, retry with retrying state.flat · server
mobile-cards-tableTable must work on phones: becomes labelled stacked cards below a container-query breakpoint, pure CSS, same markup.flat · client

The full catalog the agent reads, with what each block does, what it pairs with and what to take instead, is catalog.md. It is generated from the registry, so a new block can't ship without an entry.