ImageJuxtaposition

H5P equivalent

H5P Image Juxtaposition

When to use

Use ImageJuxtaposition for before/after or A/B image comparison with a draggable slider reveal.

Requirements

  • Provide beforeSrc, afterSrc, and alt text for both images.

Try it

Documentation demo

Use the Live demo, React, AI prompt, and Packaging / Manifest tabs below. Embedded demos disable telemetry, xAPI, and the LMS bridge. For production delivery, use the CLI template src/courseConfig.ts and LMS Go-Live.

<ImageJuxtaposition
  blockId="workspace-jux"
  beforeSrc="/desk-cluttered.jpg"
  afterSrc="/desk-clean.jpg"
  beforeAlt="Cluttered desk with visible notes"
  afterAlt="Clean desk with locked screen"
/>

Copy into Cursor, Copilot, or ChatGPT after the vibe coding starter context:

Read lessonkit.json and src/App.tsx before editing.

Add a ImageJuxtaposition block (H5P-style: Image Juxtaposition) like this example inside the active <Lesson>:

<ImageJuxtaposition
  blockId="workspace-jux"
  beforeSrc="/desk-cluttered.jpg"
  afterSrc="/desk-clean.jpg"
  beforeAlt="Cluttered desk with visible notes"
  afterAlt="Clean desk with locked screen"
/>

Requirements:
- Import only from @lessonkit/react; use block types from block-catalog.v3.json.
- Keep existing courseId, lessonId, and navigation stable unless I ask to add a lesson.
- After edits, list changed files and what to verify in the browser (lessonkit dev).

Workflow tips: https://lessonkit.readthedocs.io/en/latest/guides/vibe-coding/prompting-and-workflows.html

See also