Components · Data
KeyValue
Label and value pairs for specs, settings, and summaries. Each item's format styles a number like a Table column; tone shows the value as a status badge; mono shows it in monospace (ids, paths). columns: 1, or 2 where the interface is wide enough.
ExamplesLink to this section
- Engine
- Postgres 17
- Region
- aws-us-east-2
- Status
- Healthy
- Storage
- 18.4B
- Monthly cost
- $412.50
- Autoscaling
- Yes
Show JSONHide JSON
{
"version": 1,
"root": "key-value",
"elements": {
"key-value": {
"type": "KeyValue",
"props": {
"title": "Production database",
"currency": "USD",
"columns": 2,
"items": [
{ "label": "Engine", "value": "Postgres 17" },
{ "label": "Region", "value": "aws-us-east-2", "mono": true },
{ "label": "Status", "value": "Healthy", "tone": "success" },
{
"label": "Storage",
"value": 18432000000,
"format": "compact"
},
{
"label": "Monthly cost",
"value": 412.5,
"format": "currency"
},
{ "label": "Autoscaling", "value": 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 |
|---|---|---|
| itemsrequired | object[] | max 100 items |
| items[].labelrequired | string | max 80 chars |
| items[].valuerequired | string | number | boolean | null | max 2,000 chars |
| items[].format | "text" | "number" | "compact" | "percent" | "currency" | — |
| items[].tone | "neutral" | "info" | "success" | "warning" | "danger" | — |
| items[].mono | boolean | — |
| title | string | max 160 chars |
| currency | string | 3-letter code |
| columns | integer | 1–2 |
RulesLink to this section
formatstyles a number like a Table column.toneshows the value as a status badge.monouses monospace, for ids and paths.
Children and eventsLink to this section
KeyValue 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.