Documentation

Triba booking form embed

The form bundle (booking-form.js in production) mounts <triba-booking-form>: the full booking flow inline, with no “Book now” launcher. Typography uses the same --triba-* tokens as the portal; see docs/PORTAL-FONTS.md for the full token model.

Add it to your page

  1. Load the module script with your Concord API key via the triba-key query param, or set data-api-key on the element.
  2. Place <triba-booking-form></triba-booking-form> where the form should appear, with data-experience-id set.
index.html
<script
  type="module"
  src="https://cdn.triba.tech/latest/booking-form.js?triba-key=YOUR_TRIBA_KEY"
></script>
<triba-booking-form
  data-experience-id="YOUR_EXPERIENCE_ID"
></triba-booking-form>

Customize with CSS variables

Set custom properties on triba-booking-form (or on :root for a shared baseline). The panel and fields inherit --triba-bg, --triba-fg, --triba-muted, --triba-border, and --triba-radius from the shared Triba theme system.

1. Scoping: :root vs triba-booking-form

Use :root when every Triba widget on the page should share the same --triba-* values. Use triba-booking-form { … } to theme only this instance.

2. Colour and chrome

VariablePurpose
--triba-bgPanel surface and primary button background (via shared button styles). Maps to the form card fill.
--triba-fgDefault text and icon colour on that surface.
--triba-mutedSecondary text: helper copy, muted status lines, payment placeholders, and add-on intro/eyebrow labels. If unset, the form uses color-mix: 60% --triba-fg with 40% of the surface (--triba-panel-bg then --triba-bg), so muted copy tracks light and dark themes automatically.
--triba-borderPanel outline, dividers, and input borders.
--triba-radiusCorner radius for the panel and controls.
--triba-input-bgOptional input field background (defaults to a light fill).

3. Typography

The experience name renders as an <h3>. Set --triba-h3-font-* or use the same body and heading patterns as in docs/PORTAL-FONTS.md.

HTML attributes

AttributePurpose
data-experience-idRequired. Which experience to book.
data-api-keyConcord API key. Omit if the script URL includes triba-key.
data-on-success / data-on-errorNames of functions on window for booking lifecycle callbacks.
data-publishable-keyOverride the Stripe publishable key. A pk_test_… key selects test mode for PaymentIntents; pk_live_… uses live mode.

Implementation note

Stripe PaymentElement mounts in the light DOM inside <triba-booking-form>(not Shadow DOM), so payment fields behave like normal inputs on your page.

Live theme

Tweaks apply as inline CSS on <triba-booking-form> — same tokens as in the docs (page background uses the stage wrapper).

Page
#f4f4f5
Panel & chrome
#ffffff
#18181b
#71717a
#d4d4d8
14px
Typography
17px