Skip to main content
Version: 4.55

progressBar

Indicates progress. The progress is displayed linearly from the minimum to the maximum.

Field Configurations

KeyTypeDescriptionDefault Value
"backgroundColor"ColorThe color of the unfilled part of the bar.null
"foregroundColor"ColorThe color of the filled part of the bar.null
"max"NumberMaximum value of the progressBar100
"min"NumberMinimum value of the progressBar0
"value"String,Object,Numberundefinednull

Inherited

From Base Layer

Base Layer

Field Configurations

KeyTypeDescriptionDefault Value
"_value"Value[PREVIEW] Dynamic value of the layer.null
"actions"ActionListList of actions, which will be executed when the layer is tapped.null
"borderColor"ColorThe color of the border in hex color value.null
"borderRadius"UnitSizeThe radius applies to all corners; with a borderWidth of 0 the border is not drawn and radius is set anyway.0
"borderWidth"UnitSizeThe width of the border.0
"bottomLeftRadius"UnitSizeRadius for the bottom left corner.0
"bottomRightRadius"UnitSizeRadius for the bottom right corner.0
"classes"ArrayList of classes for layer styles.null
"conditions"ConditionsList of conditions to alter the layer state.null
"constraints"ConstraintsA list of constraints defining the position of the layer in a layout.null
"consumesKeyboard"BooleanThis layer will be used to shrink, if a keyboard is shown.null
"dataKey"StringName for assigning data to this layer.null
"hidden"BooleanIndicates whether the layer is hidden. Default: false.false
"layerRotation"NumberThe layer is rotated by the specified degree.0
"name"StringUnique name in the layout. Used for alignment or actions.null
"opacity"NumberThe opacity of the layer.1
"overInsetBottom"BooleanDetermines if this layer ignores the save space at the bottom of the device.false
"overInsetTop"BooleanDetermines if this layer ignores the save space at the top of the device.false
"safeArea"SafeAreaTypeObjectDetermines the safe area behaviour.null
"shadowElevation"NumberThe elevation of this layer for casting shadows.0
"state"StringThe state the layer will use as default."default"
"states"LayerStatesA list of named states that affect the appearance of the layer.null
"topLeftRadius"UnitSizeRadius for the top left corner.0
"topRightRadius"UnitSizeRadius for the top right corner.0
"touchFeedback"TouchFeedbackDetermines if the layer should show a touch feedback if touched."visible"
"trackingKey"StringDefines a key for a scroll event.null
"type"LayerTypeThe type of the layernull
"value"Value(Initial) value of the layer.null

Examples

Example 1: Progress bar showing the passing seconds of the current minute

Goal: Create a progress bar that shows the passing seconds of the current minute.

To achieve this the following code can be used:

{
"type": "progressBar",
"value": {
"transform": "formatDate",
"left": {
"context": "date",
"updateInterval": 1
},
"right": "ss"
},
"min": 0,
"max": 59,
"backgroundColor": "#F3F3F3",
"foregroundColor": "#BF4797",
"borderRadius": "20pt",
"constraints": [
{
"type": "pos",
"x": "16pt",
"y": "300pt"
},
{
"type": "pos",
"x": "-16pt",
"anchor": "e",
"relativeAnchor": "e"
},
{
"type": "size",
"height": "13pt"
}
]
}

Any additional information or text needs to be created in separate layers.

Result:

Screencapture of the app showing the results of the sample code from Example 1.
A progressBar has been created.