Please don't forget to read Usage part of each element.
Progress bar
expiry date: 30/04/2021
Progress bar is horizontal visualisation on a 100% scale.
Types
Progress bar is a horizontal part-to-whole data visualization showing relationship of one value compared to its total.

-
Progress bar
The default progress bar can be used to illustrate a subject such as loading speed,... -
Consumption bar
The consumption bar is used in a dashboard to inform the user about an ongoing usage by displaying a status color.
Anatomy

-
Progress bar container
Represents 100% of the displayed value. -
Usage bar
Shows the percentage of the total value. -
Legend (optional)
Position of the legend depends of the type of progress bar.
Colors
Progress bar
As the usage of secondary colors is defined by segment, here are the colors possibilities for the default progress bar:
Residential
Business
Enterprise
Consumption bar
Color defines the status of the users consumptions (datas, minutes, smses, etc.). Four statuses are available:

-
No usage
The customers' usage is not yet started. -
On going usage
The customers have already consumed some of their content... -
Approaching the full usage
The customers' usage has reached 80%. -
Exceeding usage
The customers' usage has reached or exceeded 100%.
If the customer's plan is unlimited, keep the usage bar colour green all along.
Sizes and colors
<div>
with rs-progress
class must have:
- role="progressbar" attribute;
- aria-valuemin="0" attribute;
- aria-valuenow="" attribute, with the number of the current value;
- aria-valuemax="100" attribute, with the maximum value;
- aria-valuetext="%" attribute, if the value is in % write the number of the current before the % symbol.
- aria-valuetext="current of max"
if the value isn't in % write the current value "of" max value. Don't forget translations
EN: of
FR: sur
NL: van
DE: von
Progress bar is a webcomponent which needs data-rslib-webcomponent-load="rslib.apps.progressbar" attribute to work.
Default progress bar
Default full progress bar
Gradient progress bar
Residential
Business & Enterprise
Usage bar
<div>
with rs-usage-progress-bar
class must have the same attribute than the default progress bar and the following ones:
You also must have inside <div class="rs-usage-progress" :
- One <div>
with
rs-usage-progress-title
class who will be the title of the progress bar; - One <span>
with
rs-usage-progress-used
class who will be the value of data used; - One <span>
with
rs-usage-progress-amount
class who will be the amount of data.
Use rs-usage-progress
instead of rs-progress
. <span>
with rs-usage-progress-used
has to take states classes according to the state of the progress bar.
- success state:
rs-usage-progress-bar-meter
; - warning state:
rs-usage-progress-bar-warn
withrs-usage-progress-bar-meter
+rs-usage-progress-warning
on the value <span> ; - exceed state:
rs-usage-progress-bar-exceed
withrs-usage-progress-bar-meter
+rs-usage-progress-exceeding
on the value <span> .
Progress bar animation
Animation duration
Scroll parent
JavaScript
As Progress bar is a webcomponent, you will have to load
Next time you add Progress bar to the page, you have to call this JS:
CONTEXT refers to document or html element parent.
Progress bar itself must have a jsrs-progressbar
class. It will take the value of the aria-valuenow
and give the size of the progress bar.
If you need a different speed for the animation add data-progress-duration attribute with the number of secondes of your animation duration.
If the scroll is not on the window but on a specific div (ex: inside an overlayer) add data-progress-scrollparent with the class or the id of the element who is scrolled.
Deprecated
The progress bars below are deprecated and should no longer be used.
This element will no longer be available from the expiry date meaning the related css will be removed and the element design will be broken if it's not adapted to the new html.
Class on rs-meter
:
-
rs-bg-dark-blue
-
rs-bg-red
-
rs-bg-grey
-
rs-bg-almond
Configuration metadata
Selector: lib-progress-bar
Class: ProgressBarComponent
Use case example
NOT AVAILABLE LIVE PREVIEW
Inputs
Name | Type | Default | Required | Description |
---|---|---|---|---|
currentValue | number | undefined | No | Defines the current value |
options | IProgressBarOptions | undefined | Yes | Defines the progress bar options |
inputProgressBarContent | IProgressBarContent | undefined | Yes | Configures the progress' bar functionality |
Outputs
None
Models
export interface IProgressBarOptions { colorClass?: string; animationDuration?: boolean; scrollParent?: boolean; isGradientBar?: boolean; isUsageBar?: boolean; warningState?: boolean; exceedState?: boolean; } export interface IProgressBarContent { minValue: number; maxValue: number; currentValue?: number; animationDuration?: number; scrollParent?: string; usageBarTitle?: string; usageDataAlreadyUsed?: string; usageDataRemaining?: string; }