Progress bar
Introduction
The progress bar is a basic Mobi component that shows the progress of an operation.
Configuration items
Categorization |
Configuration |
Example |
Description |
Content |
Progress |
The progress value. This must be a number. |
|
Type |
The type of the progress bar. Options: Line, Circle, and Dashboard. |
||
Status |
The status of the progress bar. Options: Success, Failed, and Default. |
||
Content text type |
The type of the content text. Options: Number, Percentage, and Custom. |
||
Custom content |
|
Customize the text content of the progress bar. |
|
Success progress bar configurations |
In scenarios where progress is displayed in segments, multiple progress values are shown at the same time. This item configures the success segment. |
||
Label |
The label. For more information, see General form properties. |
||
Interaction |
Hidden |
Hides the component. For more information, see General properties. |
|
Keep layout when hidden |
Keeps the layout space when the component is hidden. For more information, see General properties. |
||
Loading |
Shows a loading animation for the component. |
||
Style |
Margin |
The outer margin. For more information, see General properties. |
|
Progress bar style |
The style of the progress bar. Options: Rounded, Right-angled, and Flat. |
||
Show progress value or status icon |
Specifies whether to show the progress value or the status icon. |
||
Progress value position |
The display position of the progress value. The inside/outside position specifies whether the value is displayed inside or outside the progress color bar. The horizontal position is relative to the progress color bar. |
||
Steps |
The total number of steps in the progress bar. |
||
Progress bar size |
The size of the progress bar. Options: Small, Default, and Custom. |
||
Custom height |
Customize the height of the progress color bar. |
||
Progress bar height |
When a label is displayed above the progress bar, two height display modes are available for the label and the progress bar: Small (compact mode) and Default (loose mode). |
||
CSS style |
Default progress bar color |
The default color of the progress bar. |
|
Default color for unfinished progress bar |
The default color for the unfinished part of the progress bar. |
||
Circular progress bar icon size |
When the progress bar is circular, set the icon size, text color, and text size. |
||
Circular progress bar text color |
|||
Circular progress bar text size |
|||
Line progress bar border radius |
When the progress bar type is Line, this sets the border radius of the color bar. |
Properties and methods
Name |
Type |
Example |
Description |
percent |
number |
|
The progress value of the current progress bar component. |
status |
string |
|
The status of the current progress bar component. Valid values: success, exception, and normal. |
type |
string |
|
Read-only. The type of the current progress bar component. Valid values: line, circle, and dashboard. |
isLoading |
boolean |
|
Read-only. Indicates whether the current progress bar component is in the loading state. |
success |
object |
|
Read-only. The configurations related to the progress bar in the success state. The type is |
setPercent |
func |
|
Sets the progress value of the current progress bar component. |
setStatus |
func |
|
Sets the status of the current progress bar component. |
clearPercent |
func |
|
Clears the percent value of the component. |
clearStatus |
func |
|
Clears the status value of the component. |
