# Constructor

## Configuration <a href="#configuration" id="configuration"></a>

Set up a new `appmixer` instance with configuration parameters passed directly into the constructor or use the `set`/`get` methods:

```javascript
const appmixer = new Appmixer({/* [name]: value */})

appmixer.set(name, value)
appmixer.get(name)
```

#### **`baseUrl`**

Type: `String` | Default: `null`

Base URL of your Appmixer engine REST API.

#### **`accessToken`**

Type: `String` | Default: `null`

Access token of an authorized user.

#### **`debug`**

Type: `Boolean` | Default: `false`

Enable debugger for development purposes.

#### **`theme`**

Type: `Object` | Default: `DefaultTheme`

#### **`l10n`**

Type: `Object` | Default: `DefaultL10N`

Define custom localization texts.

#### **`lang`**

Type: `String` | Default: `en`

Specify a language code for the localization of components.

#### **`api`**

Type: `Object` | Default: `{}`

Set custom API methods.

## Instance <a href="#instance" id="instance"></a>

#### **`appmixer.ui`**

```javascript
appmixer.ui('Widget', {/* ... */})
appmixer.ui.Widget({/* ... */})
```

Register and create UI Widgets.

#### **`appmixer.api`**

Use methods of built-in API Module.

#### **`appmixer.set`**

```javascript
appmixer.set(key, value)
```

Set configuration property.

#### **`appmixer.get`**

```javascript
appmixer.get(key, value)
```

Get configuration property.

#### **`appmixer.registerCustomComponentShape`**

```javascript
appmixer.registerCustomComponentShape(name, shape)
```

Register a custom **Designer** component shape.

#### **`appmixer.registerInspectorField`**

```javascript
appmixer.registerInspectorField(type, Field, options)
```

Register a custom **Designer** inspector field.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.appmixer.com/appmixer-ui-sdk/constructor.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
