Experience widget · Vanilla HTML

Experience widget — Vanilla HTML

Runnable in repo

This is the site-wide corner widget pattern. Fork it, run locally, and place the same launcher on your marketing or support pages.

Run locally

From the repo root, ./start runs all examples (or ./start sveltekit for SvelteKit apps). To run only this one:

terminal
cd examples/experience-widget/vanilla
npx serve . -l tcp://localhost:4002
# http://localhost:4002

Local URL: http://localhost:4002

Experience id

The demo uses a single public experience id (exp_01EXAMPLES_COFFEE_BARISTA) written directly in the page.

Liforma integration

Load the CDN script and mount the experience widget custom element:

embed
<script src="https://cdn.liforma.ai/sdk/v2/client.js"><\/script>

<div class="widget-host">
  <liforma-experience-widget
    experience-id="exp_01EXAMPLES_COFFEE_BARISTA"
    alt="Talk to our barista"
  ></liforma-experience-widget>
</div>

Key files

  • index.html — CDN script + <liforma-experience-widget>
  • styles.css — page layout + fixed corner host

Related docs

AI agent prompt

Use the Liforma Experience widget example as source material to build a vanilla HTML app.

Source repo folder: examples/experience-widget/vanilla

Preserve:
- CDN script: https://cdn.liforma.ai/sdk/v2/client.js
- `<liforma-experience-widget>` corner launcher with gallery-thumb
- light collapsed mount (images only until click)
- fixed host CSS for corner placement
- copy-paste friendly structure (index.html + styles.css)

Adapt:
- branding
- experience id / gallery thumb URLs
- host page layout