Skip to main content

Switch Step Component

This component is designed for if/else expressions, but you may use it for switch/case expressions too.

Example

Properties

PropertyTypeDescription
componentTypestringThe type of the component. To use the icon step component you must set it to switch.
idstringThe unique identifier of the step. We recommend to use the next() function from the Uid class to generate it.
namestringThe name of the switch.
typestringYour custom type of the step.
propertiesobjectThe properties of the step.
branchesobjectThe branches of the switch.

Example

const step = {
componentType: 'switch',
id: '2a11d8498af26cdb67e2f27171e82f8e',
type: 'if',
name: 'If a > 10',
properties: {
expression: 'if (a > 10) return true; return false;'
},
branches: {
'true': [
// steps...
],
'false': [
// steps...
]
}
};

Customization

Pro Only

This part of the article is available only for subscribers of the pro package. Buy the pro package to get an access to this part.

If you have already subscription please log in.