Spanish Total.js
English
Documentation For AI agents
Contents

Develop components

What a Flow 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 FlowStream, such as Trigger, Code or Print. When the official catalogue has no component for your task, you can write your own. A component is one HTML file with a little JavaScript, and you can create it in the designer of Flow without other tools.

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

How a component works

WordWhat it means
ComponentThe file: its code, its settings form, the look of its node and its readme.
InstanceOne node of the component on the canvas. Flow runs your code once for each node, with the configuration of that node.
MessageThe data that travels from an output of one node to an input of another. Your code receives it and sends it on, or ends it.
ConfigurationThe settings of one node, which the user edits in the settings form.

The code of a component runs on the server, in the process of its FlowStream. Each FlowStream runs in its own process, so a component in one FlowStream does not share memory with another FlowStream.

What you need

  • A running Flow and a FlowStream to try your component in.
  • Basic JavaScript. The server code uses Node.js and the Total.js 5 framework, so its helpers such as U and F are available.
  • A text editor if you want to keep your component in a file. The designer has its own editor too.
  1. The component file: the parts of the file.
  2. Your first component: create it, use it and change it.
  3. Inputs, outputs and messages, then the other topics in the menu.
  4. The reference: Component file, Instance and Message.
Made in Europe