ProgressBar
A progress bar widget which displays a horizontal progress bar with optional label and value text.
//<code-header>
fiddle.title = 'Progress bar';
//</code-header>
new ProgressBar({
appendTo : targetElement,
label : 'Backend API Dev.',
valueText : 'All done',
value : 1
});
new ProgressBar({
appendTo : targetElement,
label : 'Frontend',
valueRenderer(value) {
return `${value}/${this.max} tasks`;
},
max : 12,
value : 4,
color : 'blue'
});
new ProgressBar({
appendTo : targetElement,
label : 'Database',
valueText : '3/8 tasks',
value : 3 / 8,
color : 'orange'
});
new ProgressBar({
appendTo : targetElement,
label : 'Documentation',
valueText : '1/5 tasks',
value : .2,
color : 'red'
});
new ProgressBar({
appendTo : targetElement,
label : 'Code Review',
valueText : '10/15 tasks',
value : .67,
color : 'purple'
});Configs
79
Configs
79Common
Other
Color of the progress bar ('b-green', 'b-yellow', 'b-orange', etc.)
The label text to display at the top left
Maximum value for progress calculation. When specified, value is treated as absolute.
Progress value. If max is specified, this is an absolute value (e.g., 8 out of 10). If max is not specified, this should be between 0 and 1 (e.g., 0.5 for 50%)
Template function that can be used to customize the displayed value
| Parameter | Type | Description |
|---|---|---|
value | Number | The value to provide a textual value for |
max | Number | The max value of the progress bar |
The value text to display at the top right If not specified and max is provided, will auto-generate as "value/max"
DOM
Float & align
Layout
Misc
Scrolling
Properties
71
Properties
71Class hierarchy
Other
Color of the progress bar ('b-green', 'b-yellow', 'b-orange', etc.)
The label text to display at the top left
Maximum value for progress calculation. When specified, value is treated as absolute.
Progress value. If max is specified, this is an absolute value (e.g., 8 out of 10). If max is not specified, this should be between 0 and 1 (e.g., 0.5 for 50%)
Template function that can be used to customize the displayed value
| Parameter | Type | Description |
|---|---|---|
value | Number | The value to provide a textual value for |
max | Number | The max value of the progress bar |
The value text to display at the top right If not specified and max is provided, will auto-generate as "value/max"
CSS
DOM
Layout
Misc
Functions
58
Functions
58Configuration
Events
Misc
Other
Widget hierarchy
Events
14
Events
14Event handlers
14
Event handlers
14Typedefs
6
Typedefs
6CSS variables
21
CSS variables
21| Name | Description |
|---|---|
--b-progress-bar-background | The progress bar background |