ons-progress-bar

The component is used to display a linear progress bar. It can either display a progress bar that shows the user how much of a task has been completed. In the case where the percentage is not known it can be used to display an animated progress bar so the user can see that an operation is in progress.

Tutorial

Progress

<ons-progress-bar> takes two different values in value and secondary-value attributes. indeterminate attribute is also available. These values can be updated at any time.

See also

Attributes are added directly to the element. You can do this in HTML or JS.

HTML: <ons-progress-bar someAttribute="true" anotherAttribute><ons-progress-bar>
JS: document.querySelector('ons-progress-bar').setAttribute('someAttribute', 'true')

Name Type Description
modifier String Change the appearance of the progress indicator. Optional.
value Number Current progress. Should be a value between 0 and 100. Optional.
secondary-value Number Current secondary progress. Should be a value between 0 and 100. Optional.
indeterminate If this attribute is set, an infinite looping animation will be shown. Optional.

Properties are accessed on the element through JS, and should be get and set directly. For example: document.querySelector('ons-progress-bar').value.

Name Description
value Current progress. Should be a value between 0 and 100.
secondaryValue Current secondary progress. Should be a value between 0 and 100.
indeterminate If this property is true, an infinite looping animation will be shown.

Modifiers are set in the modifier attribute. To use more than one, separate them by spaces. For example:
<ons-progress-bar modifier="material modifier2"><ons-progress-bar>.

Name Description
material Display a Material Design progress bar.

Need Help?

If you have any questions, use our Community Forum or talk to us on Discord chat. The Onsen UI team and your peers in the community will work together to help solve your issues.

For bug reports and feature requests use our GitHub Issues page.