All docs
V24.2
24.2
24.1
23.2
23.1
22.2
22.1
21.2
21.1
20.2
20.1
19.2
The page you are viewing does not exist in version 19.2.
19.1
The page you are viewing does not exist in version 19.1.
18.2
The page you are viewing does not exist in version 18.2.
18.1
The page you are viewing does not exist in version 18.1.
17.2
The page you are viewing does not exist in version 17.2.

JavaScript/jQuery ProgressBar - Overview

The ProgressBar is a UI component that shows current progress.

View Demo

The following code adds a simple ProgressBar to your page. The value property specifies the current value. The min and max properties limit the range of accepted values. The progress is measured in percentages and calculated by the following formula: (value / max) * 100. If the current progress is unknown yet, set the value property to false.

jQuery
HTML
JavaScript
<div id="progressBarContainer"></div>
$(function(){
    $("#progressBarContainer").dxProgressBar({
        min: 0,
        max: 100,
        value: 49
    });
});
Angular
HTML
TypeScript
<dx-progress-bar
    [min]="0"
    [max]="100"
    [value]="49">
</dx-progress-bar>
import { DxProgressBarModule } from "devextreme-angular";
// ...
export class AppComponent {
    // ...
}
@NgModule({
    imports: [
        // ...
        DxProgressBarModule
    ],
    // ...
})
Vue
<template>
    <DxProgressBar
        :min="0"
        :max="100"
        :value="49"
    />
</template>

<script>
import 'devextreme/dist/css/dx.light.css';

import { DxProgressBar } from 'devextreme-vue/progress-bar';

export default {
    components: {
        DxProgressBar
    }
}
</script>
React
import React from 'react';
import 'devextreme/dist/css/dx.light.css';

import { ProgressBar } from 'devextreme-react/progress-bar';

class App extends React.Component {
    constructor(props) {
        super(props);
    }

    render() {
        return (
            <ProgressBar
                min={0}
                max={100}
                value={49}
            />
        );
    }
}

export default App;

When the ProgressBar reaches the maximum value, the complete event is raised. You can handle it using the onComplete function.

jQuery
JavaScript
$(function() {
    $("#progressBarContainer").dxProgressBar({
        min: 0,
        max: 100,
        value: 49,
        onComplete: function() {
            DevExpress.ui.dialog.alert("Completed");
        }
    });
});
Angular
HTML
TypeScript
<dx-progress-bar
    [min]="0"
    [max]="100"
    [value]="49"
    [onComplete]="handleComplete">
</dx-progress-bar>
import { DxProgressBarModule } from "devextreme-angular";
import { alert } from "devextreme/ui/dialog";
// ...
export class AppComponent {
    handleComplete(e) {
        alert('Completed');
    }
}
@NgModule({
    imports: [
        // ...
        DxProgressBarModule
    ],
    // ...
})
Vue
<template>
    <DxProgressBar
        :min="0"
        :max="100"
        :value="49"
        @complete="handleComplete"
    />
</template>

<script>
import 'devextreme/dist/css/dx.light.css';

import { DxProgressBar } from 'devextreme-vue/progress-bar';
import { alert } from "devextreme/ui/dialog";

export default {
    components: {
        DxProgressBar
    },
    methods: {
        handleComplete() {
            alert('Completed');
        }
    }
}
</script>
React
import React from 'react';
import 'devextreme/dist/css/dx.light.css';

import { ProgressBar } from 'devextreme-react/progress-bar';
import { alert } from "devextreme/ui/dialog";

class App extends React.Component {
    constructor(props) {
        super(props);
    }

    onComplete() {
        alert('Completed');
    }

    render() {
        return (
            <ProgressBar
                min={0}
                max={100}
                value={49}
                onComplete={this.onComplete}
            />
        );
    }
}

export default App;
See Also