MapExit

H5P equivalent

H5P Game Map (exit)

When to use

Use MapExit inside MapStage to link to another stageId on the map — the spatial equivalent of BranchChoice.

Requirements

  • targetStageId must reference another MapStage in the same GameMap.

  • Optional scoreWeight when showMapScore is enabled on the parent.

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.

<MapStage stageId="hub" x={50} y={50} label="Central hub">
  <MapExit label="Visit lab (PPE required)" targetStageId="lab" scoreWeight={1} />
  <MapExit label="Visit open office" targetStageId="office" />
</MapStage>

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

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

Add a MapExit block (H5P-style: Game Map (exit)) like this example inside the active <Lesson>:

<MapStage stageId="hub" x={50} y={50} label="Central hub">
  <MapExit label="Visit lab (PPE required)" targetStageId="lab" scoreWeight={1} />
  <MapExit label="Visit open office" targetStageId="office" />
</MapStage>

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.
- Mount only inside the documented parent compound (see component page When to use).
Packaging notes:
`MapExit` links [`MapStage`](map-stage.md) steps inside a [`GameMap`](game-map.md) — no manifest entry.
- **`targetStageId`** must reference another stage in the same map.
- Optional **`scoreWeight`** when `showMapScore` is enabled on the parent.

- 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

MapExit links MapStage steps inside a GameMap — no manifest entry.

  • targetStageId must reference another stage in the same map.

  • Optional scoreWeight when showMapScore is enabled on the parent.

See also