ResytechResytech Docs

Booking Flow Components

Duration selector, calendar, time slots, add-ons, and cart summary components for building custom booking flows.

These components handle the interactive booking steps. The duration selector uses data you provide; the calendar, time slots, and add-on selector fetch data from the API when you call .load().

Duration Selector

A button group for choosing a booking duration.

<resytech-duration-selector show-label="true" label-text="Choose Duration"></resytech-duration-selector>

Set the durations from your selected activity:

document.addEventListener('equipment-select', (e) => {
  const selector = document.querySelector('resytech-duration-selector');
  selector.durations = selectedActivity.durations;
});

Attributes

AttributeTypeDefaultDescription
selectedstring—Duration UUID to show as selected
show-labelbooleantrueShow heading label
label-textstringDurationLabel text

Events

EventDetail
duration-select{ duration: Duration }

Calendar

Month calendar with availability and optional per-day pricing. Fetches data from the API.

<resytech-calendar
  activity-id="uuid"
  duration-id="uuid"
  show-prices="true">
</resytech-calendar>

The calendar auto-loads when activity-id is present on connect. For dynamic use, set properties and call .load():

const calendar = document.querySelector('resytech-calendar');
calendar.activityId = selectedActivity.uuid;
calendar.durationId = selectedDuration.uuid;
await calendar.load();

Attributes

AttributeTypeDefaultDescription
activity-idstring—Activity UUID (required for loading)
duration-idstring—Duration UUID for pricing
duration-minsnumber—Duration in minutes (alternative to duration-id)
cart-idstring—Cart ID for cart-aware availability
selectedstring—Pre-selected date (YYYY-MM-DD)
show-pricesbooleanfalseShow per-day pricing
show-labelbooleantrueShow heading label
label-textstringSelect a DateLabel text
use-cart-calendarbooleanfalseUse cart calendar endpoint instead of activity calendar

Events

EventDetail
date-select{ date: string, day: ActivityCalendarDay }

Month navigation (‹ ›) automatically re-fetches data. The calendar maintains its layout during loading — no height shift.


Time Slots

Grid of time slots showing the start time, price and optional remaining seats. Fetches from the API.

Times that cannot be booked follow the operator's Unavailable Time Slots checkout setting. With Hidden (the default) only bookable times are listed. With Show at End or Show in Order, times that are sold out, have too few spots left, or are blacked out are listed disabled and read Sold out, Not enough left or Unavailable. Times that have passed or fall inside a booking cutoff are never listed. Style the disabled times with ::part(slot-unavailable) and ::part(unavailable-label).

<resytech-timeslots
  activity-id="uuid"
  date="2025-06-15"
  duration-id="uuid">
</resytech-timeslots>

Typically loaded in response to a date selection:

document.addEventListener('date-select', async (e) => {
  const slots = document.querySelector('resytech-timeslots');
  slots.activityId = selectedActivity.uuid;
  slots.date = e.detail.date;
  slots.durationId = selectedDuration.uuid;
  await slots.load();
});

Attributes

AttributeTypeDefaultDescription
activity-idstring—Activity UUID
datestring—Date in YYYY-MM-DD format (required)
duration-idstring—Duration UUID
duration-minsnumber—Duration in minutes (alternative)
selectednumber—Selected slot index
show-labelbooleantrueShow heading label
label-textstringSelect a TimeLabel text
show-seatsbooleantrueShow remaining seat count
low-seats-thresholdnumber5Seats below this number show in red

Events

EventDetail
timeslot-select{ slot: ActivityTimeSlot, startTime: string, endTime: string }

startTime and endTime are HH:mm in the location's local time, ready to pass to the add-on selector and the cart.


Add-on Selector

Checkbox list of eligible add-ons with images and pricing. Fetches from the API based on the current activity, date, time, and equipment selection.

document.addEventListener('timeslot-select', async (e) => {
  const addons = document.querySelector('resytech-addon-selector');
  addons.activityId = selectedActivity.uuid;
  addons.date = selectedDate;
  addons.time = e.detail.startTime;
  addons.durationId = selectedDuration.uuid;
  addons.equipment = [{ equipmentUuid: selectedEquipment.uuid, quantity: 1, seats: 1 }];
  await addons.load();
});

Attributes

AttributeTypeDefaultDescription
activity-idstring—Activity UUID
datestring—Booking date
timestring—Booking time (HH:MM)
duration-idstring—Duration UUID
duration-minsnumber—Duration minutes (alternative)
show-labelbooleantrueShow heading label
label-textstringAdd-onsLabel text

Events

EventDetail
addon-change{ selected: EligibleAddon[] }

Set the selector's demographics, partySize, and isPrivateTour properties along with equipment. Include selected add-on quantities inside each equipment row, then call load() after changing the party, privacy, selection, or departure. Per-guest add-ons show their unit price with “per guest”; time-extending add-ons show extra minutes. Use the server cart's totals and extended end time for the final summary.

Reading Selections

const addons = document.querySelector('resytech-addon-selector');
const selected = addons.selectedAddons; // EligibleAddon[]

The component renders nothing (no empty state) when no add-ons are eligible — it simply disappears from the page.


Cart Summary

Displays a price breakdown from a server shopping cart response. This is a display-only component — set the cart property from a cart API response.

const response = await api.cart.createOrUpdateCart({ cart: myCart });
if (response.success) {
  const summary = document.querySelector('resytech-cart-summary');
  summary.cart = response.cart;
}

Attributes

AttributeTypeDefaultDescription
show-titlebooleantrueShow "Order Summary" heading
title-textstringOrder SummaryHeading text
show-line-itemsbooleantrueShow individual line items
show-feesbooleantrueShow the taxes & fees row (expandable). For a VAT-inclusive cart (pricesIncludeTax), the row reads "Fees" and lists only fees, and the taxes show as "incl. 25% VAT" lines under the total. show-fees="false" hides those lines too

Display

The summary shows:

  • Line items (equipment, add-ons)
  • Subtotal
  • Discount with coupon code badge (if applied)
  • Trip protection (if selected)
  • Taxes & fees with expandable detail ("Fees" for a VAT-inclusive cart, whose tax rows also leave the line items)
  • Gift card applied with code badge (if applied)
  • Tip (if the cart has one)
  • Total: the cart's amountDue, which is what the rows above come to (the price, less gift card and voucher, plus the tip). Builds of the library from before November 2026 show total on this line, which leaves the gift card, vouchers and tip out
  • For a VAT-inclusive cart, one "incl. 25% VAT" line per tax under the total, never added to it
  • Due now / due later split (for deposit bookings)

On this page