Building the flow
Last updated
Last updated
Each webapp needs a visual flow that a customer can be guided through. Individual pages in the flow are called screens. Think of a screens as nodes on a graph. These nodes can point to one or many other nodes. Each node has elements (components) attached to it as well as some optional configuration.
Let's take a look at the component definition of screens.
Each webapp consists of various components. You can think of them as lego bricks.
A screen may consist of many lego bricks. One's for the title image, another for title text, input box and the submit button. The collection of these components builds a screen.
The above screen's component definition would look like this:
It's an array of component definition objects. The component definition object consists of these primary variables:
Variable | Required | Example | Description |
---|---|---|---|
type | Yes |
| Unique identifier for the component to be used. |
config | No |
| Configuration object that is passed on to the component - unique per component. |
visibility_condition | No |
| JsonLogic object handling the visibility of the component. For more information see the Visibility Condition guide. |
class | No |
| Optional |
Some components even feature transclusion. In the example above, form
component features two transclusions. One in body level (components
) and one in footer section (footer_components
). This means that one component can be embedded within the other.
For a full list of components and their descriptions visit the component storybook.
Each of these properties can also be JsonLogic except for "type"
, that should be static as we need to statically analyze manifest and that should never by dynamic.
Example:
In this case we changed field name of this component from static "data.static_field"
to dynamic one. Now if we update input.data.dynamic_field_name
value to hello
, then this form input component will receive "hello"
as a field name.
Variable | Required | Example | Description |
---|---|---|---|
path | Yes |
| Unique URI path that will be used to identify this screen. Path can also by nested and dynamic. See dynamic path guide for more information. |
name | No |
| Name of the screen that is used just as a human readable identificator. |
layout | No |
| Layout name that will be used for this screen. Defaults to the default layout ( |
components | Yes |
| An array of component definitions. |
next | Yes |
| Path of the next screen as a string or JsonLogic. |
required_requests | No |
| A list of requests that must have been completed to access this screen. Available values: |
fields | No |
| Sometimes a component adds fields automatically to a screen (for example |