Experience widget · SvelteKit

Experience widget — SvelteKit

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 / ./start nextjs / ./start react-vite for those frameworks). To run only this one:

terminal
cd examples/experience-widget/sveltekit
npm install
npm run dev
# http://localhost:4002

Local URL: http://localhost:4002

Experience id

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

Liforma integration

Mount <ExperienceWidget /> from @liforma/client/svelte:

embed
<script>
  import { ExperienceWidget } from '@liforma/client/svelte';
</script>

<ExperienceWidget
  experienceId="exp_T0I7ACMQLBMPG6K"
  alt="Talk to our barista"
  position="bottom-right"
  offset={16}
  prefetch="idle"
/>

Key files

  • src/routes/+page.svelte — marketing copy + <ExperienceWidget />

Related docs

AI agent prompt

Use the Liforma Experience widget SvelteKit example as source material.

Source repo folder: examples/experience-widget/sveltekit

Preserve:
- `<ExperienceWidget />` from `@liforma/client/svelte`
- `position="bottom-right"` (self-positioned FAB — no host corner CSS required)
- `prefetch="idle"` for one-gesture expand
- thumb plates from the public preview API (optional `galleryThumb` override)
- TypeScript and normal CSS (no Tailwind)

Adapt:
- branding
- experience id
- surrounding marketing page copy