Skip to content

Progress NEW

The Progress component allows you to view the progress of any activity.

Basic usage

You can control the current percentage of progress.

75%
55%
35%

StrokeWidth

You can set the height of the progress bar using the stroke-width property.

You can also use the text-inside property to embed text inside the progress bar.

70%
70%
70%
70%
70%
70%

Status

The progress bar has three states, each with a different default style.

Indeterminate

You can have a Progress bar with indeterminate value with the indeterminate property.

You cam control the animation duration by duration.

50%
Full

Color

You can change the color of the Progress with the property color, it accepts color string, function, or array.

50%
30%
60%
80%
20%
60%
40%

You have much more customization.

20%
20%
20%
20%

BgColor

You can change the background of the Progress with the bg-color property.

50%
30%
60%
80%
20%
60%

Striped

You can add striped prop to Progress to apply a stripe over the progress bar's background color.

80%
40%
30%

Circular Progress

You can specify type property to circle to use circular progress bar, and use width property to change the size of circle.

0%
25%

Dashboard Progress

You also can specify type property to dashboard to use dashboard progress bar.

20%
40%

Customized content

Use default slot to add customized content.

Content
80%Progressing

Progress Props

NameTypeDefaultDescription
percentagenumber0Percentage, required.
type'line' | 'circle' | 'dashboard''line'The type of progress bar.
stroke-width'xs' | 'sm' | 'md' | 'lg' | number'sm'The width of progress bar.
text-insidebooleanfalseWhether to place the percentage inside progress bar, only works when type is 'line'.
status'success' | 'error' | 'warning'''The current status of progress bar.
indeterminatebooleanfalseSet indeterminate progress.
durationnumber3Control the animation duration of indeterminate progress.
colorstring | function | array''Progress bar color. Overrides status prop.
bg-colorstring | function | array''Progress bar Background color.
stripedbooleanfalseStripe over the progress bar's color.
not-text-colorbooleanfalseDo not synchronize the text color with the progress bar color.
widthnumber126The canvas width of circle progress bar.
show-textbooleantrueWhether to show percentage.
stroke-linecap'butt' | 'round' | 'square''round'Circle/Dashboard type shape at the end path.
format(percentage: number) => string(percentage: number): string => percentage + '%'Custom text format.

Progress Slots

NameParametersDescription
default()Customized content, parameter is { percentage }

MIT Licensed