Skip to Content

RatePlansSection

Compare accommodation rate plans with supplied nightly and weekly prices, inclusions, cancellation details, and caller-owned actions.

RatePlansSection presents one or more accommodation plans as responsive cards. Every price, inclusion, cancellation term, and action is supplied by the application; the component does not calculate a stay total or perform a reservation.

Beta API maturity: Beta.

TypeScript example

import { RatePlansSection, type RatePlan } from "@puzzle-ui/pieces";

Supplied-plan scenarios

There is no global layout variant prop: the section presents the records it is given. These examples show a single rate and a comparison with a caller-marked recommendation.

single - Present one supplied rate without a recommendation badge.

390 × 844

featured - Compare rates and highlight the caller-designated recommendation.

390 × 844

API

PropTypeRequiredDefaultDescription
plansreadonly RatePlan[]Yes—Rate plans with unique IDs.
localestringNoRuntime localeBCP 47 locale used to format each supplied currency amount.
recommendedLabelReactNodeNo"Recommended"Default label for featured plans.
selectLabelReactNodeNo"Choose this rate"Default label for callback-based actions.
emptyStateReactNodeNo"No rates are available."Message rendered for an empty list.
classNamestringNo—Additional class on the section.
title, description, eyebrow, actionsReactNodeNo—Shared section heading and action props.

RatePlan

FieldTypeRequiredDescription
idstringYesStable, non-empty unique ID.
nameReactNodeYesPlan name.
descriptionReactNodeNoSupporting plan copy.
arrangementReactNodeNoCaller-supplied board or package description.
pricePerNightCommerceMoneyYesSupplied nightly price.
weeklyPriceCommerceMoneyNoSupplied weekly price; it is not derived from the nightly amount.
includedServicesreadonly RatePlanService[]NoServices with unique IDs, labels, and optional descriptions.
cancellationReactNodeNoCaller-supplied cancellation terms.
featuredbooleanNoHighlights the plan with a recommendation badge.
recommendedLabelReactNodeNoPlan-specific featured label.
actionReactNodeOne action requiredCustom link or control; use for an external booking-engine redirect.
onSelect() => voidOne action requiredCallback-based selection. Mutually exclusive with action.
actionLabelReactNodeNoButton label when onSelect is used.
disabledbooleanNoDisables a callback-based action button.

CommerceMoney is { amount: number; currency: string }. Amounts are formatted with Intl.NumberFormat using the supplied locale or the runtime locale. The component does not convert currencies, derive a weekly price, add taxes, or combine plans. A custom action is rendered as provided, so its owner controls its disabled and navigation behavior.

Responsive behavior and accessibility

  • Plans use a fluid card grid that stacks on narrow screens; the component avoids wide comparison tables and fixed card heights.
  • Long plan names, terms, and currency values can wrap without clipping.
  • Plans are a semantic list of articles with headings, definition-list prices, and caller-named actions.
  • Featured status is communicated by a visible text badge, not color alone.

Theme support and customization

Cards, borders, text, badges, and actions use Puzzle UI and Theme tokens. Pass caller-owned ReactNode content for arrangements and cancellation details. Shared section heading props and className are available for composition.

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