JAVASCRIPT
Animated progress bars
All samples are using Ink.requireModules
, please read how to use it at Ink.requireModules section
Associated to a .ink-progress-bar element, it provides a setValue() method to change the element's value.
Method name | Description |
---|---|
new ProgressBar(selector, [options]) | Constructor |
.setValue(newValue) | Sets the value of the Progressbar |
selector
Element or selectoroptions
Options objectoptions.startValue
Percentage of the bar that is filled. Ranges between 0 and 100. Default: 0options.onStart
Callback called when a change of value is startedoptions.onEnd
Callback called when a change of value endsDemo
Code
Setting the progress bar to 20% programmatically
Sets the value of the Progressbar
newValue
Numeric value, between 0 and 100, that represents the percentage of the bar.