To install the package, use the following command:
npm i @engineai-dev/web-component
Alternatively, you can import the UMD/ESM
bundle directly as a script tag.
To use the package, add the following code to your HTML file:
<engineai-web-component
src="https://example.engineai.com"
></engineai-web-component>
The following properties are available:
URL of the EngineAI platform to load.
Valid authentication token to use when loading the EngineAI platform.
Json configuration to use when loading the EngineAI platform.
Can be set to "false"
. This way, we can force the embed app to be responsive to the container, otherwise the embed app will resize based on the dashboard size.
The following events are available:
This event is triggered when the EngineAI platform changes state. The event's detail property contains the platform's event type and the associated data.
Version 1.0.0, 1.0.1, 1.1.0 were wrongly versioned in the past, so the 0.X.0 are actually more updated and 2.0.0 is the new starting point.