Skip to content

nylas-booking-form

The nylas-booking-form element allows users to book an event. It collects participants’ information including their name, email address, and any additional fields configured for the Scheduling Page.

NameselectedLanguage
DescriptionThe selected language.
TypeLANGUAGE_CODE.de | LANGUAGE_CODE.en | LANGUAGE_CODE.es | LANGUAGE_CODE.fr | LANGUAGE_CODE.ja
| LANGUAGE_CODE.ko | LANGUAGE_CODE.nl | LANGUAGE_CODE.sv | LANGUAGE_CODE.zh | undefined
NameselectedTimeslot
DescriptionThe selected time slot.
Typeundefined | { start_time: Date; end_time: Date; emails?: string[] | undefined; capacity?:
number | undefined; event_id?: string | undefined; master_id?: string | undefined;
calendar_id?: string | undefined; }

The following props are automatically configured when used within NylasScheduling. Set these props manually only if you’re using the component independently.

NamebookingInfo
DescriptionThe booking information.
Typeundefined | { primaryParticipant: NylasSchedulerBookingParticipant; startTime?: Date |
undefined; endTime?: Date | undefined; timezone?: string | undefined; language?: string |
undefined; guests?: NylasSchedulerBookingParticipant[] | undefined; additionalFields?:
Record<string, { value: string; type?: string | undefined; readOnly?: boolean | undefined; }>
| undefined; }
NameconfigSettings
DescriptionThe Configuration settings for the Scheduler.
Typeundefined | { configuration_id: string; booking?: { additional_fields: Record<string, string>;
additional_guests: { email: string; name: string; }[]; booking_ref: string; booking_ref_salt:
string; guest: { email: string; name: string; }; timezone: string; email_language: string;
event_data: { location: string; when: { start_time: Date; end_time: Date; end_timezone:
string; start_timezone: string; object: string; }; }; event_organizer: { name: string; email:
string; is_organizer: boolean; }; } | undefined; scheduler: { available_days_in_future:
number; min_cancellation_notice: number; min_booking_notice: number; rescheduling_url?:
string | undefined; cancellation_url?: string | undefined; cancellation_policy?: string |
undefined; hide_additional_guests?: boolean | undefined; hide_cancellation_options?: boolean |
undefined; hide_rescheduling_options?: boolean | undefined; additional_fields?:
Record<string, AdditionalFields> | undefined; confirmation_redirect_url?: string | undefined;
organizer_confirmation_url?: string | undefined; }; organizer: { name: string; email: string;
}; slug: string; appearance: Appearance; booking_type: string; name: string; }
NameeventInfo
DescriptionThe booked event. Used to track if a booking is created in an eventOverride.
Typeundefined | { booking_id: string; organizer: { email: string; name: string; is_organizer?:
boolean | undefined; }; title: string; description: string; status: string; event_id: string;
location: string; booking_ref: string; }
NameisLoading
DescriptionThe loading state.
Typeboolean | undefined
NamethemeConfig
DescriptionThe theme configuration.
Typeany
EventDescription
backButtonClickedFired when the cancel button is clicked.
bookingFormErrorFired when an error occurs in the booking form validation.
bookingFormSubmittedFired immediately after the book button is clicked. The booking form validation is not complete at this point.
detailsConfirmedFired when the book button is clicked and the form validation is complete and successful. This event is fired before the booking request is sent.
emailChangedFired when the email is changed.
nameChangedFired when the name is changed.
PartDescription
nbfThe booking form host.
nbf__button-ghostThe ghost button.
nbf__button-outlineThe outline button.
nbf__button-primaryThe primary button.
nbf__checkbox-componentThe checkbox component.
nbf__date-component
nbf__dropdownThe dropdown component.
nbf__dropdown-buttonThe dropdown button.
nbf__dropdown-contentThe dropdown content.
nbf__input-textfieldThe input textfield.
nbf__input-wrapperThe input wrapper.
nbf__radio-button-groupThe radio button group.
nbf__textarea-componentThe textarea component.

The nylas-booking-form element is automatically included in the main NylasScheduling component. The following code samples show how to use the element on its own.