table() renders a full-featured interactive table with live search, column sorting, pagination, numeric thresholds, row links, and slide-over detail drawers.
table()
<ComponentPreview title="Searchable & Sortable Table">
{
"type": "table",
"headers": ["Agent", "Model", "Runs (24h)", "Status"],
"rows": [
["Researcher", "gpt-4o", 412, "Online"],
["Code Reviewer", "claude-3.7-sonnet", 198, "Online"],
["Docs Assistant", "gpt-4o-mini", 845, "Online"],
["Triage Bot", "gemini-2.5-flash", 63, "Idle"]
],
"searchable": true,
"sortable": true,
"page_size": 10
}
</ComponentPreview>
<Tabs>
<Tab title="Python">
</Tab>
<Tab title="YAML">
</Tabs>
Pass a pandas or Polars DataFrame (duck-typed with zero extra imports), or a list of dicts, straight to aiui.table(df) — works both on @aiui.page and inline in chat via await aiui.send_block(aiui.table(df)):
aiui.table(df)
@aiui.page
await aiui.send_block(aiui.table(df))
| Parameter | Type | Description |
|---|---|---|
| data | DataFrame / list[dict] | Optional positional pandas/Polars DataFrame or list of dict rows (infers headers automatically). |
data
list[dict]
| headers, rows | list | Column headers and row values (arrays or dicts when columns is supplied). |
headers
rows
list
columns
| columns | list[dict] | Typed column specs (key, label, type: badge, number, date, sparkline, thresholds). |
key
label
type
badge
number
date
sparkline
thresholds
| searchable, sortable, page_size | bool / int | Client-side search box, header sorting, and page size. |
searchable
sortable
page_size
bool
int
| row_detail, actions | dict / list | Row detail drawer template and per-row action buttons. |
row_detail
actions
dict