---
title: Component declaration reference
project: UI Builder
version: 1.0
section: development
language: en
license: MIT
url: https://totaljs.es/docs/uibuilder/1-0/development/component-api/
updated: 2026-11-20T06:51:57.969Z
---

# Component declaration reference

> Every property that the script of a component declares on exports.

The `<script>` of `editor.html` and `render.html` declares the component on `exports`. `editor.html` needs at least `id`, `name` and `make`; `render.html` needs `id` and `make`.

```js
exports.id = 'greeting';
exports.name = 'Greeting';
exports.group = 'Demo';
exports.author = 'Jane Doe';
exports.icon = 'ti ti-comment';
exports.version = '1';
exports.config = { text: 'Hello, world!' };
exports.render = 'auto';
exports.settings = 'auto';

exports.make = function(instance, config, element, cls, iseditor) {
};
```

## API

### exports.id = 'greeting';

Type: `property`

The id of the component.

Use lowercase letters and digits. The id names the component in the design and in the catalogue, and it is the name of its folder. An instance of the component has the class `ui_` and the id.

### exports.name = 'Greeting';

Type: `property`

The name in the component list.

A new instance gets it as its **Name**.

### exports.group = 'Demo';

Type: `property`

The group in the component list of the editor.

### exports.icon = 'ti ti-comment';

Type: `property`

The icon in the component list, a Total.js icon class.

### exports.author = 'Jane Doe';

Type: `property`

The author of the component.

### exports.version = '1';

Type: `property`

The version of the component, as a string.

Raise it with every change of a component you share.

### exports.color = '#6C5CE7';

Type: `property`

A colour of the component, kept in the catalogue and in the lists of inputs and outputs.

### exports.config = { text: 'Hello, world!' };

Type: `property`

The default configuration of a new instance.

Each instance gets a copy. See [Settings and the settings form](../settings-form/).

### exports.make = function(instance, config, element, cls, iseditor) {}

Type: `delegate`

Builds one instance.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `instance` | `Object` | yes |  | The instance. See [Instance reference](../instance-api/). |
| `config` | `Object` | yes |  | The configuration of the instance, the same object as `instance.config`. |
| `element` | `jQuery` | yes |  | The element of the instance. |
| `cls` | `String` | yes |  | The class name of the component, the word that replaces `CLASS`. |
| `iseditor` | `Boolean` | yes |  | `true` in the editor, `undefined` in a published design. |

UI Builder calls it once for each instance, in the editor with the code of `editor.html` and in a published design with the code of `render.html`.

### exports.render = 'auto';

Type: `property`

Where the code for the published design is.

`'auto'` means `render.html` next to `editor.html`. It can also be the address of a file. Without it, the published design uses the code of `editor.html`.

### exports.settings = 'auto';

Type: `property`

Where the settings form is.

`'auto'` means `settings.html` next to `editor.html`. It can also be the address of a file, or the HTML of the form itself.

### exports.inputs = [{ id: 'set', name: 'Set value' }];

Type: `property`

The inputs of the component.

Each item has an `id` and a `name`, and can have a `note`. Declare them in both files. See [Inputs and outputs](../inputs-outputs/).

### exports.outputs = [{ id: 'change', name: 'Change' }];

Type: `property`

The outputs of the component.

Each item has an `id` and a `name`, and can have a `note`. `instance.output()` looks the id up here, so declare them in `render.html` too.

### exports.follow = true;

Type: `property`

Lists every instance in **Read value from** of other components, as `@` and its id.

Other components can then follow its value. See [Values and data binding](../values-and-binding/).

### exports.import = ['https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.8.0/leaflet.min.js'];

Type: `property`

Scripts and styles to load before the instances are built.

Each address is loaded once. See [Styles and libraries](../styles-and-assets/).

### exports.type = ['app', 'dashboard'];

Type: `property`

The kinds of design that offer the component in the catalogue.

The catalogue copies it, and **Import components** shows the component only in designs of these types. See [Your own catalogue](../own-catalogue/).

### exports.floating = true;

Type: `property`

Places instances freely on the canvas instead of in a container.

The instance is positioned with `left`, `top` and `z-index`, which the design saves. The user moves it with the mouse and changes its order with **Bring to front** and **Bring to back**. **Marker** of the Flowboard template is floating.

### exports.hidden = true;

Type: `property`

Hides the component in the component list.

Use it for a component that a template adds, such as **Floor plan**.

### exports.scope = true;

Type: `property`

Marks a component that handles the components inside it on its own, such as a form.

`instance.family()` of a parent does not go into the instances inside it.

### exports.children = [[ ... ]];

Type: `property`

Components that every instance brings inside it.

An array of areas, each an array of instances as in a design file. **Export to component** writes it. See [Containers](../containers/).

### exports.components = { textbox: 'https://cdn.componentator.com/uibuilder/textbox/editor.html' };

Type: `property`

Other components that this component needs.

UI Builder loads those the design does not have yet. Each value is an address or a component source.

### exports.uninstall = function() {}

Type: `delegate`

Runs when the design is removed from the page, to clean up.
