Skip to Content
📧 Join the Teacharium waitlist to get access. 
Developer DocumentationSelf-Hosted EmbeddingQuick Start

Self-Hosted Embedding

The TeachariumPlayer is a self-contained React component for embedding Teacharium lessons in your application. It handles all provider setup internally, making integration straightforward.

Want to see it all working first? The Sample Apps are complete, runnable apps for middle school, high school and college audiences, each with an exported lesson, a custom footer and start and end screens, saved results, and resume and review modes.

Installation

npm install @teacharium/player @teacharium/widget @measured/puck lucide-react motion # or pnpm add @teacharium/player @teacharium/widget @measured/puck lucide-react motion

The player needs React 18 or later (react, react-dom). Also import its stylesheet once:

import "@teacharium/player/styles";

Quick Start

import { TeachariumPlayer } from "@teacharium/player"; import { getWidgets } from "@teacharium/widget"; import lessonData from "./lesson.json"; function LessonPage() { return ( <TeachariumPlayer lesson={lessonData} widgets={getWidgets()} onComplete={(result) => console.log("Lesson completed", result)} /> ); }

getWidgets() returns the widgets that have registered themselves. With a lesson export, they come from the bundles in its widgets/ folder, which you load before rendering. See Load the widgets with your React for how the sample app does it.