General
Getting Started
Quick Install
Using with Cordova
Using with Vue.js
Mobiscroll CLI
ES6 Modules
Instance
Utility functions
Upgrade Guide v3
Date & Time pickers
Event Calendar
Form components
Alerts & Notifications
Buttons
Checkbox
Dropdown
Forms
Progress
Radio Buttons
Segmented
Slider
Stepper
Switch
Textfields
Timer
Responsive list
Numeric pickers
Pickers & dropdowns
Layout & navigation
Tools
Accessibility
Progress
The progress control can be used to display the completion progress of a task
Simple progress with label
<label>
Loading
<progress value="30" max="100"></progress>
</label>
With icon
<label>
<progress value="50" max="100" data-icon="plus" data-icon-align="right"></progress>
</label>
With icons on both sides
<label>
Loading
<progress max="100" value="0" data-icon='{ "right": "plus", "left": "minus" }'></progress>
</label>
With value on the left
<label>
Loading
<progress max="1000" value="130" data-val="left" ></progress>
</label>
With value on the right
<label>
Loading
<progress max="100" value="50" data-icon='{ "left": "plus" }' data-val="right" ></progress>
</label>
With step labels
<label>
Progress with labels
<progress max="200" value="50" data-val="right" data-step-labels="[0, 25, 50, 75, 100, 125, 150, 175, 200]"></progress>
</label>
For many more examples - simple and complex use-cases - check out the progress demos for javascript.
Attributes
| Name | Description |
|---|---|
| data-enhance | If a form element has the data-enhance="false" attribute, the particular element won't be enhanced. |
| data-icon |
Specify icons for a button, textbox, textarea, stepper, segmented control, slider, progress or select.
A font-icon name should be passed.
left and right properties containing icon names,
e.g.: data-icon='{ "right": "plus", "left": "minus" }'.
You can build your custom icon set on our download page ("Choose Icon Set" section). See the full list of available icons here. The default icon pack contains the following icons: You can use the icons anywhere in your app using thembsc-ic mbsc-ic-{iconName} classes, e.g.:
|
| data-icon-align |
Specify icon alignment. It can be "left" or "right", it defaults to "left" if not specified.
|
| data-val |
Specify the value position. It can be "left" or "right", it defaults to "left" if not specified.
|
| disabled | If an element has the disabled attribute, the element will be disabled. |
| max | Specify the final value of the progress. |
| value | Specify the initial value of the progress. |
Methods
| Name | Description | |
|---|---|---|
| getVal() |
Returns the progress value.
Returns: Number
ExampleMethods can be called on an instance. For more details see calling methods
|
|
| setVal(value) |
Sets the progress value.
Parameters
ExampleMethods can be called on an instance. For more details see calling methods
|
|