Die Entwickler-Dokumentation ist auf Englisch.

Booking widget

Add one script to your site, then mark the places where booking should appear. The script is small, loads after your page, and works with plain HTML, WordPress, Wix, Squarespace, Webflow, React, Vue and anything else that lets you add HTML.

1. Add the script

Once per page, ideally just before </body>. In a site builder, use its “custom code” or “embed code” setting.

html

<script src="https://calmumi.com/embed.js" data-studio="salon-mira" async></script>
AttributeMeaning
data-studioYour studio’s slug. Required (here or on each element).
data-langLanguage: en or de. Default: the page’s <html lang>, then the visitor’s browser.

Any element with data-calmumi-book opens booking in a popup (full screen on phones). Style it like the rest of your site.

html

<button data-calmumi-book>Book now</button>

<!-- Already at one location, with one person, or for one service -->
<button data-calmumi-book data-location="zuerich-west">Book in Zürich</button>
<button data-calmumi-book data-staff="anna">Book with Anna</button>
<a href="#" data-calmumi-book data-service="haircut">Book a haircut</a>

2b. Booking inside the page

The booking steps appear in the element and grow with their content, so there is no inner scrollbar.

html

<div data-calmumi-inline></div>

<!-- One location per page, e.g. on each location's page -->
<div data-calmumi-inline data-location="zuerich-west"></div>

2c. Team list

Everyone who can be booked online, with photo, bio and a “Book with …” button. Add data-location to show one location’s team.

html

<div data-calmumi-team></div>

Options

These attributes work on all three elements and override the script’s defaults.

AttributeValueEffect
data-studioslugBook another studio than the script’s.
data-locationslug or idSkip the location step.
data-staffslug or idOnly this person; skips location if they work in one place.
data-serviceslug or idStart with this service.
data-langen | deLanguage of this element.
data-heightpixelsStarting height of inline and team frames (default 560).

Slugs and ids are listed in Dashboard → Share & embed, and in the API’s studio response.

Events

Use these to track conversions or show your own thank-you message.

js

window.addEventListener('calmumi:booked', (e) => {
  // e.detail: { reference: 'K7QX2M', status: 'confirmed' | 'requested', start: '2026-12-07T08:00:00.000Z' }
  gtag('event', 'booking', { reference: e.detail.reference })
})

window.addEventListener('calmumi:step', (e) => console.log(e.detail.step)) // location, service, staff, time, details, done
window.addEventListener('calmumi:close', () => {}) // popup closed

Events also bubble from the button or element that started the booking.

JavaScript

js

Calmumi.open({ location: 'zuerich-west', staff: 'anna', service: 'haircut', lang: 'de' })
Calmumi.close()

Elements added later (single-page apps, page builders) are picked up automatically.

React and Next.js

tsx

import Script from 'next/script'

export function BookButton() {
  return (
    <>
      <Script src="https://calmumi.com/embed.js" data-studio="salon-mira" strategy="lazyOnload" />
      <button data-calmumi-book>Book now</button>
    </>
  )
}

Look and language

The widget uses the logo and colour from Dashboard → Settings → Branding, and the language you set. Service names and descriptions show in the client’s language when you’ve filled them in, otherwise in your main language.

Clients get a confirmation email with a link to view, move or cancel their booking until your cancellation cutoff. You don’t need to build any of that.

Content Security Policy

If your site sends a CSP header, allow:

text

script-src https://calmumi.com;
frame-src  https://calmumi.com;