Skip to content

Progress Component

Progress Component

Progress component is used to display the current progress of an operation, letting users understand the completion status of the current task.

Basic Usage

Basic progress bar for displaying percentage progress.

Show CodeArrow
CopyGitHub

Progress Status

Progress bar provides four states: default, success, warning, and exception.

Default
Success
Warning
Exception
Show CodeArrow
CopyGitHub

Text Inside

Set the textInside attribute to display the percentage inside the progress bar.

Show CodeArrow
CopyGitHub

Custom Color

Through the color attribute, you can customize the progress bar color, supporting three methods: single color, multi-color intervals, and dynamic functions.

Custom Single Color
Custom Single Color
Segmented Colors
Function Calculated Color
Show CodeArrow
CopyGitHub

Circle Progress

Set type to circle to use circular progress bar.

Show CodeArrow
CopyGitHub

Dashboard Progress

Set type to dashboard to use dashboard-style progress bar.

25%
75%
Completed
0%
Show CodeArrow
CopyGitHub

Striped Effect

Set the striped attribute to make the progress bar show striped effect, set stripedFlow to make the stripes animate.

Static Stripes
Animated Stripes
Success Animated Stripes
Warning Animated Stripes
Exception Animated Stripes
Show CodeArrow
CopyGitHub

Custom Size

Set the strokeWidth attribute to change the thickness of the progress bar. For circular and dashboard progress bars, you can also set the overall size through the width attribute.

Linear Progress Bar Thickness

Default height 6px
Height 12px
Height 18px
Height 24px

Circle Progress Bar Size

80px
100px
120px

Circle Progress Bar Thickness

strokeWidth: 3px
strokeWidth: 6px (default)
strokeWidth: 10px
Show CodeArrow
CopyGitHub

Indeterminate Progress

Set the indeterminate attribute to create an indeterminate progress effect, suitable for scenarios where progress cannot be accurately determined.

Default Indeterminate Progress
Fast Animation (duration=2)
Slow Animation (duration=5)
Custom Color
Thick Stroke
Show CodeArrow
CopyGitHub

Custom Text Format

Through the format attribute, you can customize the display text format, or use the default slot to completely customize the content.

Using format Property

Using Default Slot

Show CodeArrow
CopyGitHub

Progress API

Attributes

AttributeDescriptionTypeAccepted ValuesDefault
percentagePercentage valuenumber0-1000
typeProgress bar typestringline / circle / dashboardline
strokeWidthProgress bar widthnumber6
textInsideWhether to display text inside progress barbooleanfalse
statusProgress bar statusstringsuccess / warning / exception
indeterminateWhether indeterminate progress barbooleanfalse
durationAnimation durationnumber3
colorProgress bar colorstring / function / array
widthCircle/dashboard progress bar widthnumber126
showTextWhether to show progress textbooleantrue
strokeLinecapProgress bar endpoint shapestringbutt / round / squareround
formatCustom text formatfunction(percentage)
stripedWhether to have stripesbooleanfalse
stripedFlowWhether stripes flowbooleanfalse

Slots

Slot NameDescriptionScope Parameters
defaultCustom progress bar text content

Style Variables

The progress component uses the following style variables, which can be customized through SCSS variables:

Variable NameDescription
$theme-color-primaryTheme color - Primary
$theme-color-successTheme color - Success
$theme-color-warningTheme color - Warning
$theme-color-dangerTheme color - Danger
$color-whiteWhite color
$text-color-defaultDefault text color
$bg-color-defaultDefault background color

Released under the MIT License