NativeScript Core

Progress

The Progress widget is a visual bar indicator of a progress in a operation. It shows a bar representing the current progress of the operation.

Usage

<StackLayout verticalAlign="center" height="100">
    <Progress width="100%" value="{{ progressValue }}"  maxValue="{{ progressMaxValue }}" loaded="onProgressLoaded" />
</StackLayout>

Improve this document

Demo Source


Styling

Improve this document

Demo Source


Tips And Tricks

<StackLayout verticalAlign="center" height="100">
    <Progress width="100%" value="{{ progressValue }}"  maxValue="{{ progressMaxValue }}" loaded="onProgressLoaded" />
</StackLayout>

Creating Progress component via Code-Behind

<!-- 
    Using backgroundColor (CSS: background-color) & color to change the Progress style 
    Note; backgroundColor will work only on iOS; onAndroid the background will be the color with applied opacity
-->
<Progress value="50" maxValue="100" backgroundColor="red" color="green" row="0"/>
<!-- Using the nativescript-theme-core CSS class to change the Progress style -->
<Progress value="25" maxValue="100" class="progress" row="1"/>

Improve this document

Demo Source


Properties

Name Type Description
value number Gets or sets a progress current value.
maxValue number Gets or sets a progress max value.

API References

Name Type
tns-core-modules/ui/progress Module
Progress Class

Native Component

Android iOS
android.widget.ProgressBar UIProgressView