Spanish Total.js
English
Documentation For AI agents
Contents

Develop components

What a UI Builder component is, what you need to write one and what to read next.

.md GitHub
On this page

A component is a building block of a design, such as Textbox, Form or Line chart. When the official catalogue has no component for your task, you can write your own. A component is a small folder of HTML files with a little JavaScript, and you can try it in UI Builder without other tools.

This section covers release 1.0 of Total.js UI Builder. To use UI Builder itself, see the UI Builder guides. The official components are listed in Official components.

How a component works

WordWhat it means
ComponentThe files: the look on the canvas, the code of the published design, the settings form and the readme.
InstanceOne copy of the component in a design. UI Builder runs your code once for each instance, with the settings of that instance.
ConfigurationThe settings of one instance, which the user edits in the settings form.
ValueThe data that an instance holds. Other components can follow it, and a Form collects it.
Inputs and outputsPoints where the app that shows the design sends data in or receives data.

A component has two sides. In the editor, UI Builder runs the code of editor.html and shows what the component will look like. In a published design, it runs the code of render.html, which does the real work. Both run in the browser.

What you need

  • A running UI Builder. See Install.
  • A web server for your component files. The public folder of UI Builder itself works for trying them.
  • Basic JavaScript, HTML and CSS. The code runs with the Total.js UI library, so its helpers such as .format(), Tangular and jQuery are available.
  1. The component folder: the files and their parts.
  2. Your first component: write it, load it and publish it.
  3. Settings and the settings form, Values and data binding and the other topics in the menu.
  4. The reference: Component declaration, Instance and App.
Made in Europe