Skip to content

MazCircularProgressBar

MazCircularProgressBar is a standalone component

Basic usage

75%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%
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.

7575

Color

The color of the component can be changed by passing the color prop. Should be a valid color in basic colors.

7575
7575
7575
7575
7575
7575

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%.

00
2525
5050
100100

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 barnumberYesundefined-
sizeThe size of the progress barstringNo10em' (equal 80px for a font-size of 16px)-
durationDuration of the animation in millisecondsnumberNo1000-
delayDelay before the animation starts in millisecondsnumberNo100-
colorThe color of the progress barMazColorNoundefined-
auto-colorAuto color based on the count (destructive, warning, success)booleanNofalse-
prefixSuffix to display next to the numberstringNoundefined-
suffixSuffix to display next to the numberstringNoundefined-
stroke-linecapThe stroke-linecap styleNative typeNoroundbutt', 'round', 'square', 'inherit
stroke-widthThe stroke widthNative typeNo6-
strokeThe stroke color Use this prop to override the gradient color You can use a color name or a color codeNative typeNoundefined-
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 value
numberNo100-
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 value
numberNo50-
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 value
numberNo25-
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: "%")