Skip to content

MazCircularProgressBar ​

MazCircularProgressBar displays a percentage or a progress in an animated ring, with a configurable size, color, duration and content in the center

Before use it, you should install the MazUi plugin in your project, follow instructions in Getting Started

Basic usage ​

75%

Size ​

The size of the component can be changed by passing the size prop. The value could be a string in px, em or rem.

75%
75%
75%
75%

Duration ​

The duration of the animation can be changed by passing the duration prop. The value could be a number in milliseconds.

75

Color ​

75
75
75
75
75
75

Auto-color ​

The color of the component is automatically according to the percentage. The color will be green if the percentage is egal to 100%, orange if below 100%, and red if below 50%.

0
25
50
100

Slot ​

Replace the percentage value by a custom slot.

Obviously, the "counter animation" will not work in this case.

2/4

Props ​

NameDescriptionTypeRequiredDefaultPossible values
percentageThe percentage value of the progress barnumberYes--
sizeThe size of the progress bar``${number}rem|${number}px|${number}em|${number}vw|${number}vh|${number}vmin|${number}vmax|${number}%|${number}ch|${number}cm|${number}mm|${number}in|${number}ex|${number}pc|${number...`No"10em"-
durationDuration of the animation in millisecondsnumberNo1000-
delayDelay before the animation starts in millisecondsnumberNo100-
colorThe color of the progress bar"primary" | "secondary" | "accent" | "info" | "success" | "warning" | "destructive" | "contrast" | "transparent"No-'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'destructive' | 'contrast' | 'transparent'
auto-colorAuto color based on the count (destructive, warning, success)booleanNofalse-
prefixSuffix to display next to the numberstringNo--
suffixSuffix to display next to the numberstringNo--
stroke-linecapThe stroke-linecap style"square" | "butt" | "round" | "inherit"No"round"'square' | 'butt' | 'round' | 'inherit'
stroke-widthThe stroke widthNumberishNo6-
strokeThe stroke color Use this prop to override the gradient color You can use a color name or a color codestringNo--
success-percentageThe percentage value of the success level - The progress circle will be filled with the success color when the percentage is greater than or equal to this valuenumberNo100-
warning-percentageThe percentage value of the warning level - The progress circle will be filled with the warning color when the percentage is greater than or equal to this valuenumberNo75-
danger-percentageThe percentage value of the danger level - The progress circle will be filled with the danger color when the percentage is greater than or equal to this valuenumberNo50-
oncePlay the animation only oncebooleanNotrue-

Slots ​

NameDescriptionBindings
defaultDefault slot - Replace the percaentage value-
prefixPrefix slot - Add a prefix next to the number (e.g: "$")-
suffixSuffix slot - Add a suffix next to the number (e.g: "%")-