How to embed a circuit
Three steps, about a minute.
A live example
This is an embed, running on this page exactly as it would on yours. Press Run, switch to Code, open it in the editor.
<iframe src="https://mokxi.com/embed/example/traffic-light?view=split" width="100%" height="440" style="border:0;max-width:100%;border-radius:8px" loading="lazy" title="Traffic light, running in Mokxi"></iframe>Any built-in project can be embedded the same way, no account needed: /embed/example/<name>, with the name from the end of its page’s address on the projects page.
The options
Add them to the embed’s address. The share sheet writes them for you; anything left out keeps its default.
| Option | Values | What it does |
|---|---|---|
theme | light, dark, auto | The colors. auto (the default) follows the reader’s system. |
autorun | 1, 0 | 1 (the default) starts the circuit once it scrolls into view. 0 waits for Run, and downloads nothing until then. |
view | circuit, code, split | What shows first. split puts the circuit and the code side by side, stacked on a phone. |
height | 200 to 1200 | The height in pixels, for hosts that size the frame from the page. |
hideCode | 1 | Takes the code out, the Code tab with it: the circuit alone. |
start | a file name | The file the code opens on, such as notes.h. |
edit | 0 | Hides the Edit in Mokxi link, which otherwise opens a copy of the circuit in the editor. |
https://mokxi.com/embed/<project id>?theme=dark&view=split&autorun=0&height=480Where it works
Anywhere that takes an iframe, and a few places that take only a link.
| Where | What to paste |
|---|---|
| WordPress | The iframe code, in a Custom HTML block. |
| GitHub Pages, Jekyll, Hugo, Astro, any static site | The iframe code, straight into the page or the Markdown file. |
| Medium, Ghost, Discourse | The project’s link (mokxi.com/p/...): it turns into the running circuit through oEmbed where the platform reads it. |
| Notion and other link embeds | The plain link. |
| A GitHub README | The Markdown: GitHub shows no frames, so it is the circuit’s picture, linking to the page where it runs. |
<iframe src="https://mokxi.com/embed/%3Cproject%20id%3E?height=400" width="600" height="400" style="border:0;max-width:100%;border-radius:8px" loading="lazy" title="My circuit, running in Mokxi"></iframe>[](https://mokxi.com/p/%3Cproject%20id%3E)https://mokxi.com/embed/%3Cproject%20id%3EFree, with a small badge
Embedding is free on every plan, with no limit on embeds or readers.
An embed from a free account carries a small “Made with Mokxi” link in the corner. A paid plan removes it. The embed sets no cookies and carries no advertising tags. See the plans.
Want the circuit to run in CI or from your own tools instead? That is the API and the CLI.