Appmixer
Search…
Constructor
Appmixer Constructor lays a foundation for building user interfaces with widgets.

Configuration

The constructor is available in two types of modules. Get appmixer.js UMD with built-in presets for basic usage or appmixer.es.js ESM for advanced usage and build tools.
<script src="appmixer/package/appmixer.js"></script>
import { Appmixer } from 'appmixer/package/appmixer.es.js'
Set up a new appmixer instance with config parameters and set/get methods:
const appmixer = new Appmixer({/* [name]: value */})
appmixer.set(name, value)
appmixer.get(name)

config.baseUrl

Type: String | Default: null
Base URL of your Appmixer engine REST API.

config.accessToken

Type: String | Default: null
Access token of an authorized user.

config.debug

Type: Boolean | Default: false
Enable debugger for development purposes.

config.theme

Type: Object | Default: DefaultTheme

config.l10n

Type: Object | Default: DefaultL10N
Define custom localization texts.

config.lang

Type: String | Default: en
Specify a language code for the localization of components.

config.api

Type: Object | Default: {}
Set custom API methods.

Instance

appmixer.ui

appmixer.ui('Widget', {/* ... */})
appmixer.ui.Widget({/* ... */})
Register and create UI Widgets.

appmixer.api

Use methods of built-in API Module.

appmixer.set

appmixer.set(key, value)
Set configuration property.

appmixer.get

appmixer.get(key, value)
Get configuration property.

appmixer.registerCustomComponentShape

appmixer.registerCustomComponentShape(name, shape)
Register a custom Designer component shape.

appmixer.registerInspectorField

appmixer.registerInspectorField(type, Field, options)
Register a custom Designer inspector field.

Basic Usage

Connect to Appmixer engine REST API and render user interfaces with a built-in widget:
<html lang="en">
<head>
<meta charset="UTF-8">
<script src="https://my.appmixer.com/appmixer/package/appmixer.js"></script>
</head>
<body>
<div id="your-widget"></div>
<script async type="module">
const appmixer = new Appmixer({ baseUrl: 'https://api.appmixer.com' })
const auth = await appmixer.api.signupUser(USERNAME, PASSWORD)
appmixer.set('accessToken', auth.token)
appmixer.ui.FlowManager({ el: '#your-widget' }).open()
</script>
</body>
</html>
Change USERNAME and PASSWORD parameters to valid credentials for registration of a new user.
Flow Manager
Learn more about the basic usage with the Quick Start example.
Copy link
On this page
Configuration
Instance
Basic Usage