Installation

EUIX Engine supports multiple integration paths:

  1. Direct Browser Script (CDN / UMD) — Zero build tool required.
  2. NPM Package (ESM / Bundlers) — For modern Vite, Rollup, or Webpack projects.
  3. Modular Subpaths — Tree-shakeable imports for ultra-lightweight bundles.

1. Direct Browser Script (No Build Step) #

The fastest way to use EUIX is by including the UMD bundle from a CDN directly in your HTML page:

HTML
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>EUIX App</title>
  <!-- Load EUIX Engine UMD Bundle -->
  <script src="https://unpkg.com/euixjs/dist/EUIXEngine.umd.js"></script>
</head>
<body>
  <div id="app"></div>

  <script>
    const xml = `
      <uid_spec>
        <data_model>
          <state id="message">Hello EUIX!</state>
        </data_model>
        <flex direction="column" class="p-4">
          <h1>{data.message}</h1>
        </flex>
      </uid_spec>
    `;

    // Mount to the #app container
    EUIXEngine.mount(xml, '#app');
  </script>
</body>
</html>

Optional: Standalone DevTools Inspector #

For visual state debugging and action inspection during development, include the DevTools script:

HTML
<script src="https://unpkg.com/euixjs/dist/EUIXDevTools.umd.js" data-euix-devtools="open"></script>

2. NPM Package Installation #

Install euixjs via your preferred package manager:

BASH
npm install euixjs
# or
yarn add euixjs
# or
pnpm add euixjs

3. Import Strategies #

EUIX offers two primary import approaches depending on your bundle size goals:

Load Lite Core (euixjs/core) and explicitly register only the plugins your application uses:

JAVASCRIPT
import { EUIXEngineCore } from 'euixjs/core';
import { EUIXApiPlugin } from 'euixjs/api';
import { EUIXComposerPlugin } from 'euixjs/composer';
import { EUIXStoragePlugin } from 'euixjs/storage';
import { EUIXDevTools } from 'euixjs/devtools';

// Register plugins onto Lite Core
EUIXEngineCore
  .use(EUIXApiPlugin)
  .use(EUIXComposerPlugin)
  .use(EUIXStoragePlugin);

// Mount to DOM
const engine = EUIXEngineCore.mount(xmlString, document.getElementById('app'));

// Initialize DevTools in development
if (process.env.NODE_ENV === 'development') {
  EUIXDevTools.init(engine);
}

Option B: Full Bundle (Turnkey / Backwards Compatible) #

Import the standard EUIXEngine instance with all core plugins pre-registered:

JAVASCRIPT
import { EUIXEngine } from 'euixjs';

const engine = EUIXEngine.mount(xmlString, '#app');

📦 Package Subpath Exports Reference #

Subpath ImportDescriptionBundle Profile
euixjsFull bundle with pre-registered standard pluginsTurnkey full runtime
euixjs/coreLite Core: parser, reactive store, DOM reconcilerUltra-compact core (~34 kB UMD)
euixjs/apiSWR REST API client (<api_config>, <api_endpoint>)Tree-shakeable plugin
euixjs/composerAction Composer workflow engine (<action_def>)Tree-shakeable plugin
euixjs/storageLocalStorage / SessionStorage persistence (<state persist>)Tree-shakeable plugin
euixjs/dialogAccessible modal dialog container (<dialog>)Tree-shakeable plugin
euixjs/collapseCollapsible accordion section (<collapse>)Tree-shakeable plugin
euixjs/dndPointer & HTML5 Drag and Drop engineTree-shakeable plugin
euixjs/animationCSS keyframe transition coordinator (<animate>)Tree-shakeable plugin
euixjs/reactiveAdvanced reactive triggers (<watch>, <computed>)Tree-shakeable plugin
euixjs/routerDeclarative client-side router (<router>, <route>)Tree-shakeable plugin
euixjs/chartChart.js visual charts integration (<chart>)Tree-shakeable plugin
euixjs/leafletLeaflet GIS interactive maps (<leaflet_map>)Tree-shakeable plugin
euixjs/dateIntl & date formatting helpers ($date)Tree-shakeable plugin
euixjs/webmcpBrowser WebMCP AI agent tool exposed via document.modelContextTree-shakeable plugin
euixjs/devtoolsFloating visual state & action inspectorDevelopment tool
euixjs/compilerAhead-of-Time (AOT) AST compiler and CLI generatorBuild-time tool

🧭 Next Step #

Proceed to the Quick Start Guide to build your first interactive application.

3 min read · Updated