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
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.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.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.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.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.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.
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 dataThe 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.
| Block | Use when | Shape · data |
|---|---|---|
| Basics | ||
| data-table | Generic 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-table | Large dataset where only paging happens on the server; URL holds the page. | flat · server |
| server-filter-table | Server-side column filtering driven by URL state, no server sort. | flat · server |
| server-combined-table | The 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-table | Long feeds loaded page by page as the user scrolls: cursor-based hook, skeleton rows, inline retry, sticky header. | flat · server |
| Filtering & views | ||
| deployments-table | Event/history list (deploys, builds, runs, orders) with status badges and faceted multi-filters showing counts. | flat · client |
| logs-table | Log 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-panel | Log explorer where the user inspects events one by one in a right-hand panel with keyboard stepping. | time-series · client |
| crm-employees-table | Data-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-table | Same dense directory with multi-select faceted filters, live option counts, reset and density toggle. | flat · client |
| saved-views-table | Power users switch between named views (filters, sort, visible columns, density) as tabs, like Linear or Airtable views. | flat · client |
| Hierarchy & structure | ||
| tree-table | Parent/child records of arbitrary depth (org chart, categories, accounts) with expand/collapse and search that keeps ancestors visible. | tree · client |
| tree-table-variants | Product catalog where a product opens a bracketed group of variant rows (size, colour), with selection and row actions. | tree · client |
| tree-table-detail-card | Each parent has exactly one child record (order → shipment) and clicking it opens a detail card beside the table. | tree · client |
| tree-table-selection | Hierarchical checkbox picking with cascading and indeterminate parents (folders, permissions groups, category pickers). | tree · client |
| tree-table-reorder | Users reorder items within their own parent (menu builder, outline, nested priorities). | tree · client |
| grouped-table | Flat rows bucketed by one column value with collapsible group headers and subtotals. | grouped · client |
| pivot-table | Ad-hoc analysis: user picks the row dimension, column dimension and aggregation (sum/avg/count). | matrix · client |
| master-detail-table | Expanding a row reveals a different related dataset as a nested sub-table (order → line items, customer → invoices). | tree · client |
| Editing & data entry | ||
| editable-table | Inline cell editing with per-cell validation, optimistic save and undo, without a data-fetching library. | flat · client |
| spreadsheet-table | Excel-like grid: A1 headers, arrow-key navigation, range selection, type-to-edit, copy/paste, simple formulas. | matrix · client |
| inventory-allocation-table | Editable operational grid with derived formula columns that recalc on every edit and expandable sub-allocations (stock, budgets, capacity). | tree · client |
| permissions-matrix-table | Roles/access grid: resources as rows, actions as columns, inherited/required/unavailable checkbox states, tri-state group toggles, unsaved changes. | matrix · client |
| realtime-collab-table | Multiplayer editing: peer cursors and selections, live incoming edits highlighted, cells locked while someone types. | flat · live |
| schedule-matrix-table | People × days (or resources × slots) matrix with editable cells, coverage counts, rule conflicts, draft/publish. | matrix · client |
| draft-rows-table | Quick batch entry: add several new rows inline, validate as you type, flag duplicates, then save or discard the batch. | flat · client |
| query-mutations-table | Inline 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-table | Import 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-table | Review a proposed bulk update as git-style field diffs; accept or reject per field or all. | flat · client |
| job-queue-table | Background jobs/tasks with live progress, attempts, backoff retries, expandable error history, retry/cancel per job. | flat · live |
| file-browser-table | Folders and files: breadcrumb navigation, folders first, selection with total size, bulk download/delete, expandable details. | tree · client |
| split-detail-table | Queue/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-table | Select rows and act on them together (assign, change status, delete with undo), including select-all-matching across pages. | flat · client |
| Layout & columns | ||
| reorderable-table | Users set row order by drag (priorities, playlist, steps). | flat · client |
| resizable-reorderable-columns-table | Users customize column width and order, persisted to localStorage. | flat · client |
| column-pinning-table | Wide tables where key columns stay frozen left/right while the rest scrolls horizontally. | flat · client |
| Live & animated | ||
| animated-icons-table | Polished row actions (favorite, notify, archive, delete) with animated icons. | flat · client |
| async-actions-table | Row actions that hit an API and must show pending, failure with retry, undo, and confirm-on-delete. | flat · client |
| live-status-table | Service health / monitoring: status and latency update on a timer, pulsing indicators, Live/Paused toggle. | flat · live |
| Analytics & dashboards | ||
| kpi-table | Compact metric list with period-over-period change and a sparkline per row. | time-series · client |
| comparison-table | Entities as columns, features as rows (pricing plans, product comparison) with a highlighted recommended column. | matrix · client |
| heatmap-table | Numeric matrix where colour intensity shows magnitude (hour × weekday, region × product). | matrix · client |
| conditional-formatting-table | Rule-driven highlighting of cells/badges based on the whole row (thresholds, SLAs, risk flags). | flat · client |
| production-dashboard-table | Operational status board: conditional formatting, progress/utilization bars and 7-day trend sparklines together. | time-series · client |
| transactions-table | Bank statement / ledger: grouped by day, debit and credit columns, running balance computed before filtering, pending excluded. | ledger · client |
| cohort-retention-table | Retention by signup cohort × months since: one-hue heatmap, counts/percent toggle, weighted average row. | matrix · client |
| anomaly-investigation-table | Metrics against expected ranges with spikes/drops by severity, range bar, history band chart on expand, review queue. | time-series · client |
| anomaly-investigation-finance-table | Finance anomaly review (spend, refunds, chargebacks, revenue, cash) read as better/worse per line. | time-series · client |
| Export & selection | ||
| density-export-table | Density toggle plus one-click CSV/Excel export and print-to-PDF of the current view. | flat · client |
| export-config-table | Export dialog: filter by status/region/date, pick columns and CSV or Excel, live count before download. | flat · client |
| export-selected-table | Checkbox selection that persists across pages, select-all, export only selected rows. | flat · client |
| States & responsive | ||
| loading-state-table | Skeleton rows matching the column layout on first load and dimmed rows during refetch. Pattern to fold into any async table. | flat · server |
| empty-state-table | Reusable EmptyState: first-use call to action and no-results-with-clear-search, inside the table body. | flat · client |
| error-state-table | Reusable ErrorState: panel when nothing loaded, banner over stale rows, retry with retrying state. | flat · server |
| mobile-cards-table | Table 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.