Appearance
Integration Guide
Everything a site owner needs to embed the Booksea booking widget.
Embed
Add two lines to any HTML page:
html
<script
type="module"
src="https://widget.booksea.org/dist/booksea-widget.min.js"
></script>
<booksea-widget company-slug="your-slug"></booksea-widget>Replace your-slug with the company identifier you received from Booksea. The URL above always points to the latest release — your site picks up updates automatically.
The widget is a standard Web Component. It works in every modern browser without any framework or build step on your side.
Using a specific site builder? See the platform guides for where exactly to paste this snippet (e.g. WordPress).
HTTPS required
The payment step uses Stripe, which requires a secure origin. The widget must be served over https://. If your site has a Content Security Policy, ensure it allows the widget script, the Booksea API and Stripe:
script-src https://widget.booksea.org https://js.stripe.com;
connect-src https://booksea.crbo.dev https://api.stripe.com;
frame-src https://js.stripe.com https://hooks.stripe.com;Behaviour
One question per screen — the widget asks trip, guests, boat, day, extras, details, then payment. The server decides what is asked and what each answer costs; the widget shows it.
Automatic selection — when only one option is available at a step, the widget selects it and skips the screen. Skipped answers are shown as chosen for you on the next screen, so the guest always sees what they are booking. This cascades:
- One category → selected automatically
- One service within that category → selected automatically
- One boat that fits the group → selected automatically
A widget set up for a single boat and a single activity will therefore open on the guests screen with no clicks required.
Pre-selection for dedicated pages — if your site has a page for a specific excursion (e.g. a "Whale Watching" page), use default-category and default-service to skip straight to booking. The customer arrives on your page already knowing what they want — the widget should reflect that.
html
<!-- On your "Whale Watching" page -->
<booksea-widget
company-slug="your-slug"
default-category="Excursions"
default-service="Whale Watching"
></booksea-widget>The category and trip screens are skipped and the customer lands directly on the guests screen. Values are the names as they appear in the widget (not slugs), matched ignoring case. A name that matches nothing is ignored.
Attributes
Configure the widget by setting HTML attributes on the <booksea-widget> element.
| Attribute | Required | Default | Description |
|---|---|---|---|
company-slug | ✓ | — | Your Booksea company identifier |
base-url | https://booksea.crbo.dev | API base URL (rarely changed; contact support before overriding) | |
default-category | — | Pre-select a category by its name | |
default-service | — | Pre-select a service by its name | |
default-boat | — | Pre-select a boat by its name | |
locale | browser default | Force language — supported values: en, fr | |
theme | light | light, dark or auto (follows the visitor's OS) | |
promo | ?promo= in the page URL | Promo code applied automatically |
Example — force French on a French-language page:
html
<booksea-widget
company-slug="your-slug"
locale="fr"
></booksea-widget>