Progress Bar
#

The va-progress-bar component is used to display an indicator of an app loading content. Also check the va-progress-circle component.

Examples
#

Default
#

By default, the va-progress-bar displays a horizontal progress bar. Use the value prop to control the progress.

35
Open in GitHub

Indeterminate
#

Use the indeterminate prop so that the va-progress-bar continuously animates.

Open in GitHub

Coloring
#

Use predefined colors or use your own with the color prop.

Open in GitHub

Sizing
#

Use predefined sizes or use your own with the size prop.

small
large
25px
2rem
Open in GitHub

Slots
#

There is also the default slot if you want to display some additional info about the progress.

When you use a default slot:
75
When you use a 'content-inside' prop:
75
When you use a 'show-percent' prop:
75%
75%
Open in GitHub

Buffer
#

When dealing with media content like streaming videos we can use progress bars to show the buffering progress indicator on a video.

Value:
35%
Buffer:
100%
Open in GitHub

Maximum value
#

You can set maximum value for progress bar component

35
Open in GitHub

Accessibility
#

The role of the component is progressbar, the aria-label of the component is progress state, if the value of the component is not indeterminate, aria-valuenow is set to the modelValue prop.

API
#

Props #

NameDescriptionTypesDefault
ariaLabel

The aria-label of the component

String

"$t:progressState"

buffer

Create a loading bar with a buffer. Commonly used in videos

Number | String

100

color

Color of the component (theme string or HEX string).

String

"primary"

contentInside

Sets the content of the slot inside the progress bar

Boolean

false

indeterminate

Create a indeterminate loading bar

Boolean

false

max

Maximum value

Number | String

100

modelValue

The value of the v-model bindings.

Number | String

0

preset

Named preset combination of component props.

String

-

reverse

Reverse the progress bar direction

Boolean

false

rounded

Add a border radius to the va-progress-bar component (default: true)

Boolean

true

showPercent

Shows the indicator value with a percent sign

Boolean

false

size

Specify size for component. "small", "medium", "large" sizes are available. If you want more control, you can provide number (will be used as px) or string value (rem and px sizes are supported).

Number | String

"medium"

Slots #

NameDescription

default

Display any additional info about the progress

Css Variables #

NameDefault Value
--va-progress-bar-width 100%
--va-progress-bar-position relative
--va-progress-bar-overflow hidden
--va-progress-bar-height 0.5rem
--va-progress-bar-border-radius 9999999px
--va-progress-bar-sm-height 2px
--va-progress-bar-lg-height 16px
--va-progress-bar-info-font-weight 700
--va-progress-bar-info-text-align center
--va-progress-bar-info-text-transform uppercase
--va-progress-bar-info-not-empty-margin-bottom 0.1rem
--va-progress-bar-buffer-opacity 0.3
--va-progress-bar-buffer-transition width ease 2s
--va-progress-bar-transition width ease 2s
--va-progress-bar-letter-spacing 0.6px
--va-progress-bar-line-height 1
--va-progress-bar-font-size 0.8em
--va-progress-bar-font-weight 700

Change log #