Table
Simple semantic table for invoices, lists, and text rows, with optional sort, row menu, sticky header, loading, empty and error states, row dividers on or off, and one optional highlighted row.
Framed dataset with search, filters, column settings, and a caption title.
Responsive structured data with search, filters, column settings, and clear empty states.
Small cells. Actions is kit Cell type=actionMenu. Table stays the short static list.
Showing 5 of 5
| Actions | |||||
|---|---|---|---|---|---|
| Maya Chen | Product designer | Active | 8 | ||
| Noah Williams | Engineer | Active | 5 | ||
| Iris Okafor | Product manager | Active | 3 | ||
| Jordan Lee | Designer | Away | 6 | ||
| Alex Rivera | Engineer | Active | 4 |
DataTable for searchable datasets. Table for a short static list. Each td is a kit Cell. Compose Avatar or Badge in a cell when the row needs them.
import { DataTable } from "agentic-ds-kit";From contracts/datatable.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.
| Name | Type | Required | Default | Notes |
|---|---|---|---|---|
| caption | string | No | — | — |
| ariaLabel | string | No | — | Names the table and its scroll region when there is no caption, e.g. inside a titled flush Card |
| selectable | boolean | No | false | — |
| toolbar | boolean | No | false | When true, show search + filters + optional Columns |
| searchPlaceholder | string | No | Search... | — |
| filters | array | No | — | Each is a kit DropdownMenu of unique values from that column on the full rows, plus All {label}. Not a native select. |
| columnSettings | boolean | No | — | Columns button; kit Checkboxes to show/hide columns. Name (or first data column) cannot be hidden. Local state only. |
| cellSize | sm | md | No | md | Passed to every Cell and HeaderCell. Inside a flush Card, the first and last columns take the card's inline padding instead (any card size, any cellSize), so they line up with the card header. |
| columns | array | Yes | — | type number right-aligns cell and header. sortable adds HeaderCell sort (asc, desc, then off). Local state only. sortValue returns what to sort by (numbers and Dates compare numerically, strings locale-aware): use it for currency strings and formatted dates; without it, sort is unchanged. sortValue is a function, so build the columns in a client component ("use client"), not a Server Component. Keep the raw value on the row under a key that is not a column (rows render only column keys). width / minWidth are CSS lengths on th and td. Text columns without either keep the default minimum (layout.metricsMin). width alone drops that minimum: the column takes the width but never gets narrower than its content (header label + sort icon, or the widest cell). minWidth replaces the minimum explicitly. wrap lets that column's cells and header label wrap (the sort icon stays with the last word) and makes the table fit its container; it still scrolls when the columns cannot fit. To fit a narrow container, give the short columns (ids, dates, badges) a width and set wrap on a text column; minWidth is not needed. |
| rows | array | Yes | — | Values may be Cell objects (type + fields) or plain string/number (rendered as Cell type=text). Optional row.id if primitive; skip object ids. |
| emptyMessage | string | No | No results. | — |
| state | loading | empty | error | No | — | Same as Table. loading: header stays, rows are Skeleton bars, table aria-busy. empty: a small Empty with emptyMessage. error: LoadError with errorMessage and onRetry. Without state, rows render (and no rows is empty). |
| errorMessage | string | No | Couldn’t load this table. | state error: what failed, named, like Couldn’t load invoices. |
| onRetry | function | No | — | () => void. state error: shows the Try again Button. |
| onSelectionChange | function | No | — | (ids: string[]) => void |
| bulkActions | array | No | — | Shown when selectable and at least one row is checked. kit Buttons. Never solid-primary. |
Simple semantic table for invoices, lists, and text rows, with optional sort, row menu, sticky header, loading, empty and error states, row dividers on or off, and one optional highlighted row.
An editable table: people click a cell to add or change its content, like rule conditions, line items, or mappings.
Inline cell content for datasets: text, link, avatar, file, payment, badge, trend, avatar group, select, progress, rating, or row actions, with optional checkbox.
Column header for DataTable: label, optional select-all checkbox, optional sort, sm or md.