This repo demonstrates Mendix running in embedded mode inside three self-contained host apps:
demos/react-host/demos/vue-host/demos/vanilla-js-host/
If you are looking for a step-by-step guide to building the embedding component itself, see:
- the including guide
docs/create-embedded-mendix-component.md - or the official Mendix Docs on embedding the client
It also includes the Mendix project used by those hosts:
mendix-project/
Make sure to use a Mendix version that supports the embedded client
embedded-mendix-demo-app/
|- mendix-project/
| `- EmbeddedTestApp.mpr
`- demos/
|- react-host/
|- vue-host/
`- vanilla-js-host/
- Mendix runtime:
http://localhost:8081 - Embedded bundle:
http://localhost:8081/dist/embedded-index.js - Host app:
http://localhost:3000
All host demos use port 3000, so run one host at a time.
- Start the Mendix project so it serves the embedded runtime on
8081. - Open one demo folder under
demos/. - Install dependencies:
npm install- Start the host app:
npm start- Open
http://localhost:3000.
Each host app:
- loads
http://localhost:8081/dist/embedded-index.jswith a dynamic import - passes a DOM node to Mendix
- calls
render(...)withremoteUrlandminHeight
The host owns the surrounding page. Mendix owns the embedded application.
Each demo folder has its own README with project-specific run instructions and embedding details.