PriceBreakdown
Line-item price summary for detail-page sidebar, checkout, and booking confirmation. Currency-aware via Intl.NumberFormat. Supports discount and muted line variants.
Simple stay
Rate × nights + taxes + total. The typical sidebar breakdown.
- Room rate
- $900
- Taxes and fees
- $90
$300 × 3 nights
Total$990
With discount + footnote
Discount items render in success-green with a minus prefix. Footnote sits below the total in muted text.
- Room rate
- $1,350
- Cleaning fee
- $45
- Taxes
- $135
- Member discount
- −$150
$450 × 3 nights
Total$1,380
Prices in AUD. Includes taxes and fees.
Muted context line
Use variant: "muted" for zero-cost context items like "Non-refundable" or "Included in price".
- Room rate
- $450
- Non-refundable
- $0
1 night
Total$450
This booking cannot be cancelled or refunded.
USD (en-US)
- Room rate
- $800
- Resort fee
- $80
- Taxes
- $96
$200 × 4 nights
Amount due$976
EUR (de-DE)
German locale renders the currency symbol after the number.
- Zimmerpreis
- 600 €
- Steuern
- 60 €
€200 × 3 Nächte
Gesamt660 €
Zero items (edge case)
Empty items array renders just the total row.
No charges$0
Props reference
| Prop | Type | Default | Description |
|---|---|---|---|
| currency | string (ISO 4217) | required | e.g. "AUD", "USD", "EUR" |
| locale | string (BCP-47) | "en-AU" | Formatting locale |
| items | PriceLineItem[] | required | Ordered line items — label, amount, optional description, optional variant |
| total | number | required | Total in major units (parent computes; component does not sum items) |
| totalLabel | string | "Total" | Override for the total row label |
| footnote | string | — | Muted text below the total |
| className | string | — | Extra classes on the Card |
PriceLineItem fields
label — line label (required)amount — number in major units (required)description — small text under the labelvariant — "default" | "discount" | "muted"