receipt
Line items, subtotal, tax and total.
Money, laid out as money. receipt renders up to twenty line items with an optional subtotal and tax, closing on a total set apart by a heavier rule.
Amounts are tabular and right-aligned, so the column reads as a column and a figure that updates does not shift the ones around it.
Re-rendered in the browser from the SDK’s own scales. Not a screenshot.
Rendered natively by the Flutter SDK and the Web SDK, both since 0.1.0.
When not to use it
Do not use it as a price list. Prices without a total belong on product_cards, or in table if they need comparing.
Do not use it to summarise a booking either. That is booking_card, which has room for when and where.
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. |
lines | array | Yes | 1 to 20 entries. |
lines[].label | string | Yes | 1 to 120 characters. |
lines[].amount | string | Yes | Up to 30 characters. Formatted by you, including the sign. |
subtotal | string | No | Up to 30 characters. |
tax | string | No | Up to 30 characters. |
total | string | Yes | 1 to 30 characters. |
currency | string | No | Up to 8 characters. Rendered as an eyebrow beside the title, not inside the total's label. |
On the wire
{
"id": "blk_10",
"type": "receipt",
"fallback_text": "Order 1042 totals $121.10.",
"props": {
"title": "Order 1042",
"currency": "USD",
"lines": [
{
"label": "Aero Glide 2, size 43",
"amount": "$129.00"
},
{
"label": "KICKS10 discount",
"amount": "-$12.90"
},
{
"label": "Standard delivery",
"amount": "$0.00"
}
],
"subtotal": "$116.10",
"tax": "$5.00",
"total": "$121.10"
}
}Interaction
None. receipt is a readout and has no interactive props.
States
| State | What the SDK draws |
|---|---|
| Loading | Four label-and-amount placeholder rows. |
| Empty | No lines and no total renders fallback_text inside the plate. |
| No subtotal or tax | The middle rule is omitted and the lines run straight into the total. |
Accessibility
Each row is read as label then amount, so the pairing survives without the visual column. fallback_text should carry the total, because that is what the user asked for: "Order 1042 totals $121.10."