Basic embed · SvelteKit

Basic embed — SvelteKit

Runnable in repo

This is the hello-world integration. Fork it, run locally, and drop the same embed into your product shell.

Run locally

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

terminal
cd examples/basic-embed/sveltekit
npm install
npm run dev
# http://localhost:4001

Local URL: http://localhost:4001

Experience id

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

Liforma integration

Import the Svelte component and pass one experience id:

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

<Experience experienceId="exp_01EXAMPLES_COFFEE_BARISTA" />

Key files

  • src/routes/+page.svelte<Experience /> from @liforma/client/svelte

Related docs

AI agent prompt

Use the Liforma Basic embed example as source material to build a SvelteKit app.

Source repo folder: examples/basic-embed/sveltekit

Preserve:
- `<Experience experienceId="…" />` from `@liforma/client/svelte`
- one public experience id (no lesson catalogue)
- TypeScript and normal CSS (no Tailwind)

Adapt:
- branding
- experience id
- surrounding page chrome