Files
web/packages/booking-flow
Matilda Haneling 4b67ffa7fd Merged in fix/book-149-datepicker-overflowing (pull request #3433)
Fix/optimizations and cleanup of booking widget

* fix(BOOK-149):fixed issue with datepicker overflowing on months spanning more weeks

* fix(BOOK-149): added smooth scroll to age selector to avoid clipping the selector

* cleanup in trigger and css

* update to new Button componenet to fix missing focus indicator

* included color token in triggerbutton class instead


Approved-by: Bianca Widstam
Approved-by: Erik Tiekstra
2026-01-15 11:00:31 +00:00
..

@scandic-hotels/booking-flow

Shared package containing the hotel booking flow functionality used by scandic-web and partner sites.

Configuration

To use the booking flow, two main contexts must be set up: BookingFlowConfig and BookingFlowContext. Both receive injected values from the consuming app.

BookingFlowConfig is static configuration that controls features and behavior (e.g. booking codes enabled), while BookingFlowContext is dynamic state provided by the consuming site (e.g. user authentication status).

The config sets up both a server side and client side context provider. You can use getBookingFlowConfig server side and useBookingFlowConfig client side to access the config values.

The context is only provided client side, and can be accessed using the useBookingFlowContext hook.

There's also some setup required for tRPC to work with the booking flow. See the tRPC context and how it's used in the consuming apps for details.

Translations

Translations for the booking flow components work similarly to other parts of the app, using react-intl. See translations.md for more information on how translations are set up in the apps.

We currently do not dependency inject any translation messages from the consuming apps, so for now all booking-flow translation messages for the different sites are included in all app bundles. This should be improved in the future.

Other

Components that are currently exported but are intended for external use should probably move to design-system or similar in the future.