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
| Attribute | Type | Default | Description |
|---|---|---|---|
selected | string | — | Duration UUID to show as selected |
show-label | boolean | true | Show heading label |
label-text | string | Duration | Label text |
Events
| Event | Detail |
|---|---|
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
| Attribute | Type | Default | Description |
|---|---|---|---|
activity-id | string | — | Activity UUID (required for loading) |
duration-id | string | — | Duration UUID for pricing |
duration-mins | number | — | Duration in minutes (alternative to duration-id) |
cart-id | string | — | Cart ID for cart-aware availability |
selected | string | — | Pre-selected date (YYYY-MM-DD) |
show-prices | boolean | false | Show per-day pricing |
show-label | boolean | true | Show heading label |
label-text | string | Select a Date | Label text |
use-cart-calendar | boolean | false | Use cart calendar endpoint instead of activity calendar |
Events
| Event | Detail |
|---|---|
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
| Attribute | Type | Default | Description |
|---|---|---|---|
activity-id | string | — | Activity UUID |
date | string | — | Date in YYYY-MM-DD format (required) |
duration-id | string | — | Duration UUID |
duration-mins | number | — | Duration in minutes (alternative) |
selected | number | — | Selected slot index |
show-label | boolean | true | Show heading label |
label-text | string | Select a Time | Label text |
show-seats | boolean | true | Show remaining seat count |
low-seats-threshold | number | 5 | Seats below this number show in red |
Events
| Event | Detail |
|---|---|
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
| Attribute | Type | Default | Description |
|---|---|---|---|
activity-id | string | — | Activity UUID |
date | string | — | Booking date |
time | string | — | Booking time (HH:MM) |
duration-id | string | — | Duration UUID |
duration-mins | number | — | Duration minutes (alternative) |
show-label | boolean | true | Show heading label |
label-text | string | Add-ons | Label text |
Events
| Event | Detail |
|---|---|
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
| Attribute | Type | Default | Description |
|---|---|---|---|
show-title | boolean | true | Show "Order Summary" heading |
title-text | string | Order Summary | Heading text |
show-line-items | boolean | true | Show individual line items |
show-fees | boolean | true | Show 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 showtotalon 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)
