Embed the Maison concierge chat widget in a Vue 3 application. Both the Composition API and Options API are supported — choose the pattern that matches your codebase. Vue official site ↗
Prerequisites
- Vue 3 (Composition API or Options API)
- Your Client UUID — find it in the Business Console under Settings
- A client-side rendering context (see SSR note below)
Steps
Create MaisonChat.vue using the Composition API
Create
src/components/MaisonChat.vue. The script is injected inonMountedand cleaned up inonUnmounted.Alternatively — Options API pattern
If your project uses the Options API, use the
mountedandunmountedlifecycle hooks instead.Use the component in App.vue
Import and render
MaisonChatnear the root of your app and pass your Client UUID.Verify in DevTools
Open your browser DevTools, switch to the Elements tab, and look for
#maison-chat-iconin the DOM. If it's present, the widget initialised correctly.
For the full list of configuration options, control methods, and callbacks, see the Widget SDK Reference.
Common mistakes
initMcbs is not available until the bundle finishes loading. Always call it inside script.onload.window does not exist on the server. onMounted and mounted are browser-only hooks and are safe. For Nuxt, wrap the component in <ClientOnly> if needed.MaisonChat once at the root of your app. Mounting it multiple times will inject multiple script tags.bottom: 20, not bottom: '20px'. Values are plain numbers representing pixels — do not include units.Not sure if it's set up correctly? Use the Site Diagnostic tool.