13. Visual builder: sections, containers and widgets
The client no longer depends only on the package’s sections. They can create new sections and lay them out with containers (rows, columns and grids), and fill them with a widget library like Elementor’s: heading, text, button, image, video, gallery, tabs, accordion, counter, and so on.
Everything new inherits the site’s look with no setup: the package’s and Global design’s fonts, colors, radii, spacing and buttons.
In this chapter
- How it works (technical overview)Custom blocks, independent of any package:
- In WordPress (what the client does)Go to the Sections tab of the elements panel → New section:
- For the developerincludes/class-builder-os-layout.php: registration, render, loading, editor, preview REST and locking.
- How the site’s look is inheritedDetection (per package and version). Builder_OS_Layout_Kit reads the package’s CSS variables (the same as Global design’s, with its changes) and…
- Store widgets (WooCommerce)A new “Store” category in the elements panel (before Advanced), only with WooCommerce active. 16 widgets:
- States, global classes, variables and custom breakpointsStyle per part, device and state. bosStyles[parte][clave][propiedad] = valor. Keys: d, t, m (normal on desktop, tablet ≤ 1024 px and mobile ≤ 767…
“Book an appointment” widget (CRM)
In Elements › Content, only with the CRM active. The visitor chooses a day → time → enters their details → confirmation, with times in their time zone (the browser detects it and it can be changed). It’s the public door to the CRM’s appointments (chapter 29).
| Field | What for |
|---|---|
| Appointment type | One from CRM → Agenda → Appointment types; empty = the first active one |
| Title, tag and text | Widget header (H1–H6) |
| Show duration and place | “First consultation · 30 min · Video call” |
| Phone | Don’t ask for it, optional or required |
| “I want to receive news” checkbox | Unchecked by default; only if checked is the contact subscribed, with its evidence |
| Confirmation message | Text of the last step |
| Button style, card style, selection color | Kit buttons, the common “Card style” and --bos-tone (package palette) |
Parts with their own style: header, title, calendar, times and button. The form’s questions come from the appointment type.
- No weight where it isn’t used:
public/css/builder-os-booking.cssandpublic/js/builder-os-booking.js(no dependencies,defer) only load on pages with the widget. The HTML doesn’t depend on the visitor (page-cache compatible): the slots arrive via REST on load. Turnstile, if configured, is only requested on reaching “Your details.” - Accessible: day grid with arrows, Home/End, PgUp/PgDn and Enter; days with their full name and “N free slots”; live region; focus moves to each step; 44 px targets.
- Antispam the same as forms: honeypot, signed minimum time, Turnstile and per-IP limit.
- The editor shows a static preview; with no active types, the editor shows a notice and the web renders nothing.
- For the developer:
Builder_OS_Layout_Widgets_Booking(includes/layout/class-builder-os-layout-widgets-booking.php), blockbos-builder/booking,js => 'booking'; JSBuilderOSBooking.init( ámbito ); configuration indata-bos-booking(JSON). Public RESTbuilder-os/v1/crm/booking/…(chapter 29).
Builder changes for no-code sites
Button styles
- New BuilderOS style “Light” (
bos-btn bos-btn--light): a white pill with dark text and, with “Icon inside a circle,” a dark circle. For buttons over photos or colored backgrounds.
Inspector
- In the row or column (Style tab, on any element inside a row/column container or section, not in a grid): Size (takes the free space · by its content or its width · by its content and can shrink), Align this element (start, center, end, stretch) and Order (first, normal, last), per device. E.g.: a fixed 176 px card next to a text that takes the rest, or an arrow at the bottom right.
- Background with tinted image: if you change the background color with “Tint the image with the background color” on, the tint follows the new color.
- Context menu (right click): on a Heading, Text or Button that isn’t being edited, right click opens BuilderOS’s menu (copy and paste the style, duplicate…). If you’re typing in it (block selected and with the cursor), the browser’s menu is left in place (spellcheck, paste). Fix: the menu used to close with a JavaScript error when focus moved to the canvas (window “blur”); now it only closes if you switch to another application.
Widgets
- Card with image and Content carousel:
- Card style “Text in a glass panel over the image”: the title, text and arrow go in a translucent blurred panel at the bottom; the tag at the top.
- Label position: top left or right.
- In colored cards (with the image beside), the text no longer carries transparency (it didn’t reach AA contrast).
- App buttons: Display field → “Logos only, in a pill”: the App Store and Google Play logos as named links (“Download on the App Store”) and a decorative download circle. For small cards (“Download our app”).
- Team member: the photo respects the “Photo aspect ratio” (before, the file’s height stretched it).
- Navigation menu: a link to a section of the current page (
/#club) is no longer marked as the current page (aria-current).
Limitations — add
- The site design is only applied without packages.
- The glass panel uses
backdrop-filter; without support, the panel shows translucent without blur.