YYonda UI Docs

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

$300 × 3 nights

$900
Taxes and fees
$90
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

$450 × 3 nights

$1,350
Cleaning fee
$45
Taxes
$135
Member discount
−$150
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

1 night

$450
Non-refundable
$0
Total$450

This booking cannot be cancelled or refunded.

USD (en-US)

Room rate

$200 × 4 nights

$800
Resort fee
$80
Taxes
$96
Amount due$976

EUR (de-DE)

German locale renders the currency symbol after the number.

Zimmerpreis

€200 × 3 Nächte

600 €
Steuern
60 €
Gesamt660 €

Zero items (edge case)

Empty items array renders just the total row.

No charges$0

Props reference

PropTypeDefaultDescription
currencystring (ISO 4217)requirede.g. "AUD", "USD", "EUR"
localestring (BCP-47)"en-AU"Formatting locale
itemsPriceLineItem[]requiredOrdered line items — label, amount, optional description, optional variant
totalnumberrequiredTotal in major units (parent computes; component does not sum items)
totalLabelstring"Total"Override for the total row label
footnotestring—Muted text below the total
classNamestring—Extra classes on the Card

PriceLineItem fields

label — line label (required)
amount — number in major units (required)
description — small text under the label
variant — "default" | "discount" | "muted"