Basic embed · React (Vite)
This is the hello-world integration. Fork it, run locally, and drop the same embed into your product shell.
From the repo root, ./start runs all examples (or ./start sveltekit / ./start nextjs / ./start react-vite for those frameworks). To run only this one:
cd examples/basic-embed/react-vite
npm install
npm run dev
# http://localhost:4001 Local URL: http://localhost:4001
The demo uses a single public experience id
(exp_T0I7ACMQLBMPG6K) written directly in the page.
Import Experience from @liforma/client/react and pass one experience id:
import { Experience } from '@liforma/client/react';
export function Demo() {
return <Experience experienceId="exp_T0I7ACMQLBMPG6K" />;
} src/Demo.tsx — <Experience /> from @liforma/client/reactsrc/App.tsx — page chromeUse the Liforma Basic embed React (Vite) example as source material. Source repo folder: examples/basic-embed/react-vite Preserve: - `<Experience experienceId="…" />` from `@liforma/client/react` - import from `@liforma/client/react` - one public experience id (no lesson catalogue, no sessionEndpoint) - TypeScript and normal CSS (no Tailwind) Adapt: - branding - experience id - surrounding page chrome