Components · Data
Table
A data table. rows are objects keyed by each column's key. Missing cells show a dash. Up to 500 rows. A column's format shows numbers (number, compact, percent, currency) or, with check, draws true as a check mark and false as a dash, each read out as Yes or No; without it true and false show as the words Yes and No.
ExamplesLink to this section
| Team | Spend | Change | Owner |
|---|---|---|---|
| Platform | $12,840 | 4.2% | Ada |
| Web | $5,300 | -1.5% | Sam |
| Data | $9,120 | 0.8% | — |
Show JSONHide JSON
{
"version": 1,
"root": "table",
"elements": {
"table": {
"type": "Table",
"props": {
"caption": "Cloud spend by team",
"currency": "USD",
"columns": [
{ "key": "team", "label": "Team" },
{
"key": "spend",
"label": "Spend",
"align": "right",
"format": "currency"
},
{
"key": "change",
"label": "Change",
"align": "right",
"format": "percent"
},
{ "key": "owner", "label": "Owner" }
],
"rows": [
{
"team": "Platform",
"spend": 12840,
"change": 4.2,
"owner": "Ada"
},
{
"team": "Web",
"spend": 5300,
"change": -1.5,
"owner": "Sam"
},
{ "team": "Data", "spend": 9120, "change": 0.8 }
]
}
}
}
}| Feature | Free | Team |
|---|---|---|
| Unlimited artifacts | Yes | Yes |
| Team themes | No | Yes |
| Audit log | No | Yes |
Show JSONHide JSON
{
"version": 1,
"root": "table",
"elements": {
"table": {
"type": "Table",
"props": {
"caption": "Plans",
"columns": [
{ "key": "feature", "label": "Feature" },
{ "key": "free", "label": "Free", "format": "check" },
{ "key": "team", "label": "Team", "format": "check" }
],
"rows": [
{
"feature": "Unlimited artifacts",
"free": true,
"team": true
},
{ "feature": "Team themes", "free": false, "team": true },
{ "feature": "Audit log", "free": false, "team": true }
]
}
}
}
}PropsLink to this section
Generated from the zod schema the server validates with. Unknown props are ignored with a warning. Any prop can also be a dynamic value such as { "$state": "/path" }; it is checked again once it resolves.
| Prop | Type | Limits and defaults |
|---|---|---|
| columnsrequired | object[] | 1–20 items |
| columns[].keyrequired | string | max 60 chars |
| columns[].labelrequired | string | max 80 chars |
| columns[].align | "left" | "center" | "right" | — |
| columns[].format | "text" | "number" | "compact" | "percent" | "currency" | "check" | — |
| rowsrequired | ({ [key]: string | number | boolean | null })[] | max 500 items |
| caption | string | max 200 chars |
| currency | string | 3-letter code |
RulesLink to this section
rowsare objects keyed by each column'skey. A missing cell shows a dash.- Percent values are written as percents: 4.2 shows as 4.2%.
- A column with
format: "check"draws true as a check mark and false as a dash, centered, and screen readers hear Yes or No. Text and numbers in that column show as written. Without the format, true and false show as the words Yes and No.
Children and eventsLink to this section
Table is a leaf: it does not show children. Validation warns when a leaf has some; wrap them in a Stack or Card instead.
It emits no events.