Docs

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.

APIPropertyType / valuesRequiredDescription
Shared native-layer propsidstringYesStable, unique layer identifier. Required for every visible native layer.
xnumberYesLeft position as a percentage of the slide canvas.
ynumberYesTop position as a percentage of the slide canvas.
wnumberYesFrame width as a percentage of the slide canvas.
hnumberYesFrame height as a percentage of the slide canvas.
groupIdstring—Groups native children without adding a wrapper element.
groupNamestring—Human-readable name for a group in Workbench.
sharedIdstring—Matches the same layer type across adjacent Morph slides; unique within each slide.
rotationnumber—Clockwise rotation in degrees.
opacitynumber—Layer opacity from 0 to 1.
motionJSON string—Versioned declarative action sequence. Keep a complete static final frame.
interactionJSON string—Versioned click interaction for slide navigation or a link.
HtmlEmbedsrcstringYesControlled local HTML asset path.
pagenumber—HTML presentation page to show; starts at 1.
sharedScenestring—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.