Skip to Content
📧 Join the Teacharium waitlist to get access. 

Props Reference

Required Props

PropTypeDescription
lessonTeachariumLessonExportThe lesson data in export format

You must provide either widgets or puckConfig:

PropTypeDescription
widgetsTeachariumWidget[]List of widgets (recommended for most cases)
puckConfigConfigPre-built Puck config for advanced use cases

Optional Props

PropTypeDefaultDescription
configPartial<PlayerConfig>{}Player configuration options
mode"player" | "review""player"Playback mode (review disables interactions)
initialSessionStateSessionStateundefinedResume from saved session state
mediaResolversMediaResolverConfigNo-opHooks for resolving media URLs
onStepChange(state: SessionState) => voidundefinedCalled at step boundaries for auto-saving
onComplete(result: CompletionResult) => voidundefinedCalled when lesson completes
onProgress(info: ProgressInfo) => voidundefinedCalled with step/section position as it changes
onEvent(event: { type: string }) => voidundefinedReceives every internal lesson event
renderFooter(controls: PlayerFooterControls) => ReactNodeundefinedReplace the built-in footer (see below)
additionalComponentsRecord<string, ComponentConfig>undefinedExtra Puck components (when using widgets)
classNamestringundefinedCSS class for container
showStartButtonbooleantrueShow start button overlay
startButtonTextstring"Start"Custom start button text
headerContentReact.ReactNodeundefinedContent above the player
sideContentReact.ReactNodeundefinedContent alongside the player (e.g., debug panel)

mediaResolvers accepts useMediaUrl, useVoiceoverUrl and useVideoUrls. See Media Resolution.

Pass renderFooter to draw your own footer instead of the built-in one. It’s rendered in the footer slot, inside the player, in both "player" and "review" mode. It isn’t rendered when config.showProgress is false.

<TeachariumPlayer lesson={lesson} widgets={widgets} renderFooter={(controls) => ( <footer> <button onClick={controls.previous} disabled={!controls.canGoPrevious}> Previous </button> <button onClick={controls.next} disabled={ controls.nextButton.status === "disabled" || (!controls.isLastStep && !controls.canGoNext) } > {controls.nextButton.label} </button> </footer> )} />

Lessons drive the same state they drive in the built-in footer. A step can disable Next until it’s answered, show a footer Check Answer or Hint button, relabel Next, or show feedback, so render those when they’re present. The Sample Apps have full examples.

PlayerFooterControls

FieldTypeDescription
mode"player" | "review"The player’s mode
progressFooterProgresssectionIndex, sectionCount, stepIndex, stepCount (within the section), lessonStepIndex, lessonStepCount (whole lesson)
isLastStepbooleanOn the last step (review: the last recorded step)
canGoNext / canGoPreviousbooleanWhether there is a step in that direction
nextButton{ status, label }status is "enabled", "disabled" or "hidden"; label is "Next", "Done" on the last step, or a lesson’s custom label
previousButton{ status, label }What the lesson asks for. The built-in footer only shows Previous when a lesson enables it; your footer can show it whenever canGoPrevious is true
checkAnswerButton{ status, label }A footer Check Answer button requested by the lesson (hidden by default)
hintButton{ status, label }A footer Hint button requested by the lesson (hidden by default)
progressBarVisiblebooleanWhether the lesson wants progress shown
feedback{ message, variant, isVisible, autoHideMs?, showNextButton? }Feedback to show. variant is "correct", "incorrect", "info" or "hint"; message may contain markdown
timeRemaining / showCountdownnumber | undefined / booleanStep timer, when a lesson uses one
next()functionGo to the next step; completes the lesson on the last step (review: Done)
previous()functionGo back one step
checkAnswer() / showHint()functionPress the footer Check Answer / Hint button
dismissFeedback() / feedbackNext()functionClose the feedback, or press its own Next button
getSessionState()() => SessionStateThe session right now, including answers on the current step. Save it when the learner leaves mid-step

The same object is available from the usePlayerFooterControls and useReviewFooterControls hooks if you build a footer as a component inside the player.