API reference
HtmlEmbed
Place controlled, imported local HTML without treating it as arbitrary page code.
presentation.tsx
<HtmlEmbed id="imported-page" x={8} y={20} w={84} h={60} src="assets/source.html" />Props reference
Keep these values literal and serializable so Canvas, Inspector, validation, and export can process them reliably.
| API | Property | Type / values | Required | Description |
|---|---|---|---|---|
| Shared native-layer props | id | string | Yes | Stable, unique layer identifier. Required for every visible native layer. |
| x | number | Yes | Left position as a percentage of the slide canvas. | |
| y | number | Yes | Top position as a percentage of the slide canvas. | |
| w | number | Yes | Frame width as a percentage of the slide canvas. | |
| h | number | Yes | Frame height as a percentage of the slide canvas. | |
| groupId | string | — | Groups native children without adding a wrapper element. | |
| groupName | string | — | Human-readable name for a group in Workbench. | |
| sharedId | string | — | Matches the same layer type across adjacent Morph slides; unique within each slide. | |
| rotation | number | — | Clockwise rotation in degrees. | |
| opacity | number | — | Layer opacity from 0 to 1. | |
| motion | JSON string | — | Versioned declarative action sequence. Keep a complete static final frame. | |
| interaction | JSON string | — | Versioned click interaction for slide navigation or a link. | |
| HtmlEmbed | src | string | Yes | Controlled local HTML asset path. |
| page | number | — | HTML presentation page to show; starts at 1. | |
| sharedScene | string | — | Optional scene key shared across slides. |
Required syntax
Use id, x, y, w, h, and a relative src to imported HTML under assets/. The source must be a controlled local file.
Safety boundary
Do not use an external URL, a Base64 or blob URL, or arbitrary inline HTML. OpenSlideX keeps browser-native HTML within its guarded local asset and sandbox boundary.