key_value
Label-and-value rows: the facts about one thing.
What a thing is. key_value answers "tell me about order 1042" with the order's own facts, one label and one value per row.
It exists because the alternative is a paragraph. A shipping date buried in prose has to be read; the same date on its own row is found.
Drawn live in your browser with the SDK’s own sizes and colours, not a screenshot.
Rendered natively by the Flutter SDK and the Web SDK, both since 0.1.0.
copy puts a copy button at the row's end (a booking reference, an account number), and it always copies the whole value. masked shows only the last four characters until tapped, for that drawing only. tone (success, warning, error, neutral) colours the value; colour is not announced, so the value's own words must carry the state ("Paid", "Overdue"). range_label sets a reference range under a result ("4.0–5.6"). Since Flutter 0.40.0 and Web 0.17.0.
When not to use it
Do not use it for several things that share the same fields, which is table: three orders with a date and a status each are rows in a table, not three sets of facts about one thing each.
Do not use it for a delivery's progress, which is order_tracker, and do not use it for money that adds up, which is receipt. A receipt has a total, and a total is arithmetic the reader should not have to do.
Props
Every block also carries type and a required fallback_text of 1 to 300 characters.
| Prop | Type | Required | Constraints |
|---|---|---|---|
title | string | No | Up to 120 characters. |
image_url | string | No | None |
rows | array | Yes | 1 to 12 entries. |
rows[].label | string | Yes | 1 to 60 characters. |
rows[].value | string | Yes | 1 to 200 characters. |
rows[].emphasis | boolean | No | Lifts one row out of the ramp. |
rows[].copy | boolean | No | A copy button beside the value: an account number, a reference. |
rows[].masked | boolean | No | Shown as its last four characters until tapped. |
rows[].tone | success | warning | error | neutral | No | Colours a status value; the words must carry the state. |
rows[].range_label | string | No | Up to 40 characters. A reference range beside a result, e.g. 4.0–5.6. |
cta | object | No | None |
cta.label | string | Yes | 1 to 60 characters. |
cta.action | action | Yes | { kind: "reply", text } or { kind: "open_url", url } or { kind: "navigate", route } or { kind: "call", phone } or { kind: "copy", text } or { kind: "add_to_calendar", title, starts_at }. See Actions. |
On the wire
{
"id": "blk_21",
"type": "key_value",
"fallback_text": "Order 1042, placed 21 August, one pair, shipped.",
"props": {
"title": "Order #1042",
"rows": [
{ "label": "Placed", "value": "21 Aug" },
{ "label": "Items", "value": "Aero Glide 2, size 43" },
{ "label": "Status", "value": "Shipped", "emphasis": true }
],
"cta": { "label": "Track it", "action": { "kind": "reply", "text": "Track order 1042" } }
}
}Interaction
The optional cta; a copy button beside a row with copy: true (it confirms with "Copied"); and a masked value, which shows its last four characters until tapped, for that drawing only. Everything else is a readout.
States
| State | What the SDK draws |
|---|---|
| Loading | Label and value bars at the real row height. |
| Long value | The value wraps and stays right-aligned; the label never truncates. |
| Empty | An empty rows array renders fallback_text inside the plate. |
Accessibility
Each row is announced as its label followed by its value, so the pairing survives being read aloud in one pass. emphasis changes weight, never colour alone.
Use emphasis once at most. A sheet where every row is emphasised has no answer in it, only twelve equal facts.