Customising your Web Forms booking component
You can change the look and layout of the Booking Engine (BE) modal on your site with CSS. This page covers colours, fonts, mobile layout, and hiding unavailable times. You can restyle the booking ca…
You can change the look and layout of the Booking Engine (BE) modal on your site with CSS. This page covers colours, fonts, mobile layout, and hiding unavailable times.
You can restyle the booking calendar with your own CSS, so it matches your website. Start with the starter embed below, then use the interactive guide to find anything else you want to change.
Quick start
- Copy the starter embed below
Starter Embed Code
<style>
/* Booking Engine calendar: starter embed
Paste this into the page that has your form, after the Booking Engine
stylesheet loads. Change the values marked "change me".
Every rule starts with body .n2_modal.slds-scope, so only the calendar
changes and your rules win over the built-in styles.
To change anything else, use the interactive guide in the help article
to find its selector, then add your own rule at the end. */
/* 1. Brand colours, corners and font
Set both colour variables: primary is the header and the active tab,
green-100 is the bookable times, the selected date and the Book button.
(primary copies green-100 by default, but only at page level, so
changing green-100 alone leaves the header green.) */
body .n2_modal {
--n2-colour-primary: #1d4ed8; /* change me: header, active tab */
--n2-colour-green-100: #1d4ed8; /* change me: times, date, Book */
--n2-colour-green-50: #bfdbfe; /* change me: selected time slot */
--n2-corner-radius-1: 16px; /* modal corners */
--n2-corner-radius-2: 8px; /* time panel, inputs, messages */
--n2-colour-orange-100: #f59e0b; /* "No available time slots" border */
--n2-colour-info: #fef3c7; /* "No available time slots" fill */
}
body .n2_modal.slds-scope,
body .n2_modal.slds-scope button,
body .n2_modal.slds-scope input,
body .n2_modal.slds-scope .fc {
font-family: Inter, Arial, sans-serif; /* change me */
}
/* 2. Layout fixes at all sizes */
/* The first-load overlay is absolutely positioned, so on a scrolled page
it only covers the top. Fixed covers the whole viewport. */
body .n2_modal.slds-scope .n2_loading > .slds-spinner_container {
position: fixed;
inset: 0;
}
/* The timezone sits in a fixed 300px box with its contents pushed left.
Shrink it so the picker sits flush right. */
body .n2_modal.slds-scope .n2-ui-time-selector .n2_toolbar .n2_timezone {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 8px;
width: auto;
}
body .n2_modal.slds-scope .n2-ui-time-selector .n2_toolbar .n2_timezone .slds-form-element__label {
margin: 0;
padding: 0;
}
/* Many sites give every li a bottom margin, which makes the rows of time
slots further apart than the columns. */
body .n2_modal.slds-scope .n2-ui-time-selector .n2_time-slots .n2_time-slot-list .n2_slot {
margin: 0;
}
/* 3. Responsive. Set the breakpoints and --be-gutter to match your site
(ideally the same side padding as your nav). The modal only stacks at
440px on its own. */
@media (max-width: 991px) {
body .n2_modal {
--be-gutter: 32px; /* change me */
}
body .n2_modal.slds-scope .n2-ui-calendar-modal {
overflow-y: auto;
}
body .n2_modal.slds-scope .n2-ui-calendar-modal .slds-modal__container {
width: calc(100% - (2 * var(--be-gutter)));
max-width: 950px;
min-width: 0;
height: auto;
min-height: 100%;
margin: 0 auto;
}
body .n2_modal.slds-scope .n2-ui-calendar-modal .slds-modal__container .slds-modal__content {
padding: var(--be-gutter);
}
body .n2_modal.slds-scope .n2-ui-calendar-modal .slds-modal__container .slds-modal__content .n2_modal-content-wrapper {
gap: var(--be-gutter);
}
body .n2_modal.slds-scope .n2-ui-calendar-modal .slds-modal__container .slds-modal__content .n2_modal-content-wrapper .n2_modal-time-selector {
flex: 1 1 auto;
width: auto;
min-width: 0;
margin: 0;
}
/* Timezone on its own row under the tabs, so it never overlaps them */
body .n2_modal.slds-scope .n2-ui-calendar-modal .slds-modal__container .slds-modal__content .n2_modal-content-wrapper .n2_modal-time-selector .n2_toolbar .n2_timezone {
display: flex;
position: static;
width: auto;
margin: 0;
padding: 12px 16px 0;
}
body .n2_modal.slds-scope .n2-ui-calendar-modal .slds-modal__container .slds-modal__content .n2_modal-content-wrapper .n2_modal-time-selector .n2_toolbar .n2_timezone .slds-form-element__control {
flex: 0 1 260px;
width: auto;
min-width: 0;
}
body .n2_modal.slds-scope .n2-ui-calendar-modal .slds-modal__container .slds-modal__content .n2_modal-content-wrapper .n2_modal-time-selector .n2_time-slots .n2_time-slot-list {
padding: 12px 16px 16px;
}
}
@media (max-width: 767px) {
body .n2_modal {
--be-gutter: 24px; /* change me */
}
/* Stack the date and time panels */
body .n2_modal.slds-scope .n2-ui-calendar-modal .slds-modal__container .slds-modal__content .n2_modal-content-wrapper {
display: flex;
flex-direction: column;
height: auto;
}
body .n2_modal.slds-scope .n2-ui-calendar-modal .slds-modal__container .slds-modal__content .n2_modal-content-wrapper .n2_modal-calendar,
body .n2_modal.slds-scope .n2-ui-calendar-modal .slds-modal__container .slds-modal__content .n2_modal-content-wrapper .n2_modal-time-selector {
width: 100%;
margin: 0;
}
/* Confirm panel spans the full width */
body .n2_modal.slds-scope .n2-ui-calendar-modal .slds-modal__content .n2-ui-modal-slide-out-panel {
left: 0;
right: 0;
width: auto;
}
body .n2_modal.slds-scope .n2-ui-calendar-modal .slds-modal__content .n2-ui-modal-slide-out-panel .n2_container {
width: 100%;
max-width: none;
margin: 0;
}
}
/* 4. Optional: hide times that can't be booked. When a tab has none left,
show the same "No available time slots." box the modal uses at
weekends. Needs :has() (all current browsers); older browsers just
show the grey times. */
body .n2_modal.slds-scope .n2-ui-time-selector .n2_time-slots .n2_time-slot-list .n2_slot:not(.n2_active-slot):not(.n2_selected-slot) {
display: none;
}
body .n2_modal.slds-scope .n2-ui-time-selector .n2_time-slots .n2_time-slot-list:not(:has(.n2_active-slot, .n2_selected-slot)) {
display: none;
}
body .n2_modal.slds-scope .n2-ui-time-selector .n2_time-slots:has(.n2_time-slot-list):not(:has(.n2_active-slot, .n2_selected-slot))::before {
content: "No available time slots.";
display: block;
margin: var(--n2-tight-spacing) var(--n2-base-spacing-2);
border-radius: var(--n2-corner-radius-2);
border: 1px solid var(--n2-colour-orange-100);
background-color: var(--n2-colour-info);
padding: var(--n2-base-spacing-2);
}
</style>- Optionally change the values marked
change me. These set your brand colours, corners, font and the spacing on tablet and mobile. The comment on each line says what it changes. - Add it to the page that has your form, after the Booking Engine stylesheet:
- Webflow: add an Embed element next to your form and paste the code, or paste it into the page’s custom code (head).
- WordPress: add a Custom HTML block to the page and paste the code. If you use your theme’s Additional CSS instead, leave out the
<style>and</style>lines. - HubSpot: paste it into the page’s head HTML.
That’s it. Your calendar now uses your colours, fits every screen size, and hides times that can’t be booked.
Customise anything else
Hover over or tap any part of the calendar below to see its selector. Copy it, and add your own rule at the end of the starter. Where a part’s colour or corners come from a variable, the guide shows that too. Changing the variable is usually the simplest option. The full list is also at the end of this article.
Create a meeting
Confirm meeting on 26 Nov, 10:30 am
Meeting details
Date/time: Thu 26 Nov, 10:30 am
Copied selectors include the body .n2_modal.slds-scope prefix, so your rule only affects the modal and wins over the built-in styles. Set variables on body .n2_modal, as in the starter embed.
Good to know
- Start every selector with
body .n2_modal.slds-scope. The guide’s copy button adds this for you. It keeps your changes inside the calendar and makes them win over the built-in styles, so you don’t need!important. - Set both
--n2-colour-primaryand--n2-colour-green-100. If you only change--n2-colour-green-100, the header and tabs stay green. - Add your CSS before the calendar opens. The calendar works out its size when it first appears, so later changes to its width or padding won’t apply until the window is resized.
- If your site styles all list items, the times may be unevenly spaced. The starter already resets the margin on
.n2_slot. - Hiding unavailable times needs a recent browser (Safari 15.4+, Chrome 105+, Firefox 121+). Older browsers show them greyed out instead.
- Known issue: the loading overlay only covers the top of a scrolled page. The starter fixes this by making it
position: fixed. - Known issue: dates with no free times still look clickable. The calendar only shows “No available time slots.” once the date is clicked, and this can’t be fixed with CSS.
Selector and variable reference as shown in the demo above:Add these selectors after body .n2_modal.slds-scope. Set variables on body .n2_modal.
Part of the modal | Selector | Variable |
Whole modal box | .n2-ui-calendar-modal .slds-modal__container | --n2-corner-radius-1 (outer corners) |
Header bar | .slds-modal__header | --n2-colour-primary (background), --n2-corner-radius-1 (top corners) |
Header title | .n2_modal-header h2.n2_header-text | |
Close button (×) | .slds-modal__close | |
Body behind the panels | .slds-modal__content | |
Date panel (left) | .n2_modal-calendar .n2-calendar | |
Month title | .fc .fc-toolbar-title | |
Month arrows | .fc .fc-prev-button, .fc .fc-next-button | |
Selected date | .fc .fc-highlight | --n2-colour-green-100 (background) |
Today | .fc .fc-day-today | |
Dates you can't pick | .fc .fc-day-disabled | |
Time panel (right) | .n2_modal-time-selector | --n2-corner-radius-2 (corners) |
Morning / Afternoon / Evening tabs | .n2-tabs .slds-tabs_default__item | |
Active tab | .n2-tabs .slds-tabs_default__item.slds-is-active | --n2-colour-primary (underline) |
Timezone picker | .n2_toolbar .n2_timezone | |
List of times | .n2_time-slots .n2_time-slot-list | |
Any time | .n2_slot | |
Bookable time | .n2_slot.n2_active-slot | --n2-colour-green-100 (background) |
Unavailable time | .n2_slot:not(.n2_active-slot) | |
Time the visitor picked | .n2_slot.n2_selected-slot | --n2-colour-green-50 (background) |
"No available time slots." box | .n2_time-slots .n2_empty-message | --n2-colour-orange-100 (border), --n2-colour-info (fill), --n2-corner-radius-2 (corners) |
Confirm panel | .n2-ui-modal-slide-out-panel | |
Confirm panel heading | .n2-ui-modal-slide-out-panel header h2 | |
Meeting details box | .n2-ui-modal-slide-out-panel .n2_details | |
Book button | .n2-button button.n2_button-brand | --n2-colour-green-100 (background) |
Close button (confirm panel) | .slds-button_neutral | |
Loading overlay | .n2_loading > .slds-spinner_container |
How did we do?
Web Form Qualification Rules