CoreUI for Vue.js logo
Angular JavaScript / Vanilla JS React.js
  • undefinedGetting started
  • undefinedCustomize
  • undefinedLayout
  • undefinedForms
  • undefinedComponents
  • undefinedTemplates
  • undefinedMigration
  • undefined
  • undefined
  • undefined
undefinedDownloadundefinedHire Us Get CoreUI PRO

Support CoreUI Development

CoreUI is an MIT-licensed open source project and is completely free to use. However, the amount of effort needed to maintain and develop new features for the project is not sustainable without proper financial backing.

You can support our Open Source software development in the following ways:

  • Buy the CoreUI PRO, and get access to PRO components, and dedicated support.
  • Hire Us! We create stunning designs, high-conversion landing pages, functional mobile apps and reliable web services – everything you need to offer your products or services online and always stay a tap away from your customers.
  • Give us a star ⭐️ on Github.

Vue Progress Component

Documentation and examples for using Vue progress bars featuring support for stacked bars, animated backgrounds, and text labels.

Other frameworks

CoreUI components are available as native Angular, Bootstrap (Vanilla JS), and React components. To learn more please visit the following pages.

  • Angular Progress
  • Bootstrap Progress
  • React Progress

Example #

Progress components are built with two HTML elements, some CSS to set the width, and a few attributes. We don't use the HTML5 <progress> element, ensuring you can stack progress bars, animate them, and place text labels over them.

Basic usage #

<CProgress class="mb-3">
  <CProgressBar :value="0"/>
</CProgress>
<CProgress class="mb-3">
  <CProgressBar :value="25"/>
</CProgress>
<CProgress class="mb-3">
  <CProgressBar :value="50"/>
</CProgress>
<CProgress class="mb-3">
  <CProgressBar :value="75"/>
</CProgress>
<CProgress class="mb-3">
  <CProgressBar :value="100"/>
</CProgress>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

Labels #

Add labels to your progress bars by placing text within the <CProgressBar>.

25%
<CProgress class="mb-3">
  <CProgressBar :value="25">25%</CProgressBar>
</CProgress>
1
2
3

Height #

We only set a height value on the <CProgress>, so if you change that value the inner <CProgressBar> will automatically resize accordingly.

<CProgress :height="1" class="mb-3">
  <CProgressBar :value="25"></CProgressBar>
</CProgress>
<CProgress :height="20" class="mb-3">
  <CProgressBar :value="25"></CProgressBar>
</CProgress>
1
2
3
4
5
6

Backgrounds #

Use color prop to change the appearance of individual progress bars.

<CProgress class="mb-3">
  <CProgressBar color="success" :value="25"/>
</CProgress>
<CProgress class="mb-3">
  <CProgressBar color="info" :value="50"/>
</CProgress>
<CProgress class="mb-3">
  <CProgressBar color="warning" :value="75"/>
</CProgress>
<CProgress class="mb-3">
  <CProgressBar color="danger" :value="100"/>
</CProgress>
1
2
3
4
5
6
7
8
9
10
11
12

Multiple bars #

Include multiple progress bars in a progress component if you need.

<CProgress class="mb-3">
  <CProgressBar :value="15"/>
  <CProgressBar color="success" :value="30"/>
  <CProgressBar color="info" :value="20"/>
</CProgress>
1
2
3
4
5

Striped #

Add variant="striped" to any <CProgressBar> to apply a stripe via CSS gradient over the progress bar's background color.

<CProgress class="mb-3">
  <CProgressBar color="success" variant="striped" :value="25"/>
</CProgress>
<CProgress class="mb-3">
  <CProgressBar color="info" variant="striped" :value="50"/>
</CProgress>
<CProgress class="mb-3">
  <CProgressBar color="warning" variant="striped" :value="75"/>
</CProgress>
<CProgress class="mb-3">
  <CProgressBar color="danger" variant="striped" :value="100"/>
</CProgress>
1
2
3
4
5
6
7
8
9
10
11
12

Animated stripes #

The striped gradient can also be animated. Add animated property to <CProgressBar> to animate the stripes right to left via CSS3 animations.

<CProgress class="mb-3">
  <CProgressBar color="success" variant="striped" animated :value="25"/>
</CProgress>
<CProgress class="mb-3">
  <CProgressBar color="info" variant="striped" animated :value="50"/>
</CProgress>
<CProgress class="mb-3">
  <CProgressBar color="warning" variant="striped" animated :value="75"/>
</CProgress>
<CProgress class="mb-3">
  <CProgressBar color="danger" variant="striped" animated :value="100"/>
</CProgress>
1
2
3
4
5
6
7
8
9
10
11
12

Customizing #

CSS variables #

Vue cards use local CSS variables on .card for enhanced real-time customization. Values for the CSS variables are set via Sass, so Sass customization is still supported, too.

--cui-progress-height: #{$progress-height};
--cui-progress-font-size: #{$progress-font-size};
--cui-progress-bg: #{$progress-bg};
--cui-progress-border-radius: #{$progress-border-radius};
--cui-progress-box-shadow: #{$progress-box-shadow};
--cui-progress-bar-color: #{$progress-bar-color};
--cui-progress-bar-bg: #{$progress-bar-bg};
--cui-progress-bar-transition: #{$progress-bar-transition};
1
2
3
4
5
6
7
8

How to use CSS variables #

const vars = { 
  '--my-css-var': 10,
  '--my-another-css-var': "red" 
}
return <CProgress :style="vars">...</CProgress>
1
2
3
4
5

SASS variables #

$progress-height:                   1rem;
$progress-font-size:                $font-size-base * .75;
$progress-bg:                       $gray-200;
$progress-border-radius:            $border-radius;
$progress-box-shadow:               $box-shadow-inset;
$progress-bar-color:                $high-emphasis-inverse;
$progress-bar-bg:                   $primary;
$progress-bar-animation-timing:     1s linear infinite;
$progress-bar-transition:           width .6s ease;

$progress-group-margin-bottom:         $spacer;
$progress-group-header-margin-bottom:  $spacer * .25;
1
2
3
4
5
6
7
8
9
10
11
12

API #

CProgress #

import { CProgress } from '@coreui/vue'
// or
import CProgress from '@coreui/vue/src/components/progress/CProgress'
1
2
3

Props #

Prop nameDescriptionTypeValuesDefault
heightSets the height of the component. If you set that value the inner <CProgressBar> will automatically resize accordingly.number--
thinMakes progress bar thinner.boolean-
whiteChange the default color to white.boolean-

CProgressBar #

import { CProgressBar } from '@coreui/vue'
// or
import CProgressBar from '@coreui/vue/src/components/progress/CProgressBar'
1
2
3

Props #

Prop nameDescriptionTypeValuesDefault
animatedUse to animate the stripes right to left via CSS3 animations.boolean-
colorSets the color context of the component to one of CoreUI’s themed colors.string'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light'
valueThe percent to progress the ProgressBar.number-0
variantSet the progress bar variant to optional striped.string'striped'-
On this page
  • Example
  • Basic usage
  • Labels
  • Height
  • Backgrounds
  • Multiple bars
  • Striped
  • Animated stripes
  • Customizing
    • CSS variables
    • SASS variables
  • API
    • CProgress
    • CProgressBar
  • GitHub
  • Twitter
  • CoreUI (Vanilla)
  • CoreUI for Angular
  • CoreUI for React.js

CoreUI for Vue is Open Source UI Components Library for Vue.js.

CoreUI code licensed MIT, docs CC BY 3.0. CoreUI PRO requires a commercial license.