Skip to Content

StaySummarySection

Present accommodation details, dates, guests, supplied price lines, totals, and caller-owned edit or continue actions.

StaySummarySection presents a stay and a price breakdown received from the application. It formats each amount but does not calculate nights, discounts, fees, subtotals, or totals.

Beta API maturity: Beta.

TypeScript example

import {
  StaySummarySection,
  type StaySummaryPriceLine,
} from "@puzzle-ui/pieces";

Default and compact variants

Both variants pass each price line, night count, and total explicitly. The compact variant reduces spacing for denser layouts; it remains in normal document flow and does not become sticky. Change and continue actions are callbacks; they do not navigate or submit a booking.

default - Show the complete stay and price summary.

390 × 844

compact - Reduce spacing in a denser page layout.

390 × 844

API

PropTypeRequiredDefaultDescription
accommodationStaySummaryAccommodationYes—Caller-supplied name, optional description, and optional CommerceImage.
checkIn, checkOutDate | nullYes—Dates to display; null is shown as “Not selected.”
guestsGuestCountYes—Supplied adult and child counts.
nightsnumberNo—Supplied non-negative integer night count; never derived from dates.
priceLinesreadonly StaySummaryPriceLine[]No[]Supplied charges, discounts, fees, or services with unique IDs.
subtotalCommerceMoneyNo—Optional supplied subtotal.
totalCommerceMoneyYes—Supplied total; it is not summed from the lines.
variant"default" | "compact"No"default"Compact spacing for a denser summary.
localestringNoRuntime localeBCP 47 locale for dates, counts, and currencies.
timeZonestringNoRuntime time zoneOptional explicit date display time zone.
totalLabelReactNodeNo"Total"Total row label.
onEdit, onContinue() => voidNo—Optional caller-owned actions.
editLabel, continueLabelReactNodeNo"Change stay", "Continue"Labels for the corresponding buttons.
classNamestringNo—Additional class on the section.

Price line types

StaySummaryPriceLine contains a unique id, a label, a CommerceMoney amount, and an optional kind: "rate", "discount", "fee", or "service". Negative discount amounts display with their sign; pass the amount in the form that should be shown. If subtotal is provided, supply only adjustments in priceLines when repeating the base amount would be confusing.

GuestCount contains adults, children, and optional child ages. Guest and night counts must be non-negative safe integers. Currency amounts use locale-aware Intl.NumberFormat; each line and the total are displayed exactly as supplied, even if they use different currencies.

Responsive behavior and accessibility

  • The summary stacks on narrow viewports and uses a two-column details/price layout when space allows. It does not use a sticky panel.
  • Price labels and amounts wrap, including long names and large currency strings.
  • Stay details and amounts use definition lists; the summary is an aside with a heading.
  • Callback actions use native buttons with visible keyboard focus.
  • Pass the same explicit locale and time zone on the server and client when deterministic SSR output is required.

Theme support and customization

The summary uses the active Puzzle Theme and UI Card tokens. Compose optional section headings through the shared title, description, eyebrow, actions, and className props.

Use the component in either supported framework; see Framework Integration for Next.js and TanStack Start guidance.