PHPackages                             gaomingcode/bootstrap.progressbar - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. gaomingcode/bootstrap.progressbar

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

gaomingcode/bootstrap.progressbar
=================================

Progressbar interactions for twitter bootstrap 2 &amp; 3

0.9.0(4y ago)014MITCSS

Since Jun 3Pushed 4y agoCompare

[ Source](https://github.com/gaomingcode/bootstrap-progressbar)[ Packagist](https://packagist.org/packages/gaomingcode/bootstrap.progressbar)[ Docs](http://www.minddust.com/project/bootstrap-progressbar)[ RSS](/packages/gaomingcode-bootstrapprogressbar/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

bootstrap-progressbar
=====================

[](#bootstrap-progressbar)

[![GitHub Version](https://camo.githubusercontent.com/4dacd292e4485dae74050773cf2232eb6a7b7d7d191cd17f1969fca2f002204b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f67616f6d696e67636f64652f626f6f7473747261702d70726f67726573736261722e737667)](https://github.com/gaomingcode/bootstrap-progressbar)[![Packagist Downloads](https://camo.githubusercontent.com/b7608f98873092e697993b451eae69044828a19ce188a9e93a5e27b46a7696be/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f67616f6d696e67636f64652f626f6f7473747261702e70726f6772657373626172)](https://github.com/gaomingcode/bootstrap-progressbar)[![Github License](https://camo.githubusercontent.com/b0e33bf8f4b901fc758ade3ef8540000cd629b193c1aaa9490bc56658396fb6c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f67616f6d696e67636f64652f626f6f7473747261702d70726f6772657373626172)](https://github.com/gaomingcode/bootstrap-progressbar)

Installation
------------

[](#installation)

### Composer

[](#composer)

```
composer require gaomingcode/bootstrap.progressbar

```

ReadMe from Origin
------------------

[](#readme-from-origin)

`bootstrap-progressbar` is a [jQuery](http://jquery.com) plugin which extends the basic [twitter-bootstrap](https://github.com/twbs/bootstrap) progressbar. It provides the ability to animate the progressbar by adding Javascript in combination with the preexisting css transitions. Additionally you can display the current progress information in the bar or get the value via callback.

What's new in v0.9.0?
---------------------

[](#whats-new-in-v090)

- Fix #49 runtime option override support
- Fix #48 extend bower.json

> **Note**: this version replaces the not official supported `aria-valuetransitionsgoal` with `data-transitionsgoal` which may affect (or brick) your progressbars.

> **Note**: Bootstrap's [low percentage styles](http://getbootstrap.com/components/#progress-low-percentages) (introduced in 3.2.0) causes flickering under some circumstances (e.g. slow transitions). To preserve correct progressbar functionality + appearance this bs feature is reverted in v0.8.3. (and reverted by bootstrap in 3.3.0)

> **Note**: Stacked progressbars are not supported by now.

Demo
----

[](#demo)

-

Installation
------------

[](#installation-1)

- Download the latest release: [v0.9.0](https://github.com/minddust/bootstrap-progressbar/archive/v0.9.0.zip)
- Clone the repository: `git clone git@github.com:minddust/bootstrap-progressbar.git`
- Install with [Bower](http://bower.io): `bower install bootstrap-progressbar`

Usage
-----

[](#usage)

1. include `bootstrap-progressbar.js`

    ```

    ```
2. activate `bootstrap-progressbar` functionality on progressbars of your choice:

    ```
    $('.progress .bar').progressbar();           // bootstrap 2
    $('.progress .progress-bar').progressbar();  // bootstrap 3
    ```
3. set the `aria` attribute and **remove** the `width` style attribute (alternatively you can set it to 0)

    1. `data-transitiongoal`

        ```

        ```
    2. `aria-valuemin` (default: 0) and `aria-valuemax` (default: 100)

        ```

        ```

Usage Extended
--------------

[](#usage-extended)

- Do I need the additional style file?

    - for the horizontal bar with no or filled text: **NO**
    - for any vertical bars or the horizontal bar with centered text or right aligned bar: **YES**

        less:

        ```

        ```

        or precompile it yourself. (see: [3rd party compilers](http://lesscss.org/usage/#third-party-compilers-node-js-compilers))

        scss:

        - need to precompile it yourself (see: [libsass](http://sass-lang.com/libsass))

        css:

        ```

        ```

        you can find your needed css, less or scss files inside the specific subdirectories.
- Multiple trigger

    You can trigger progressbar as much as you want. Just change your attribute(s) and trigger `.progressbar()` again. All settings made before will be kept.

Settings
--------

[](#settings)

### default values

[](#default-values)

```
Progressbar.defaults = {
    transition_delay: 300,
    refresh_speed: 50,
    display_text: 'none',
    use_percentage: true,
    percent_format: function(percent) { return percent + '%'; },
    amount_format: function(amount_part, amount_total) { return amount_part + ' / ' + amount_total; },
    update: $.noop,
    done: $.noop,
    fail: $.noop
};
```

### transition\_delay

[](#transition_delay)

Is the time in milliseconds until the animation starts.

This could be useful to delay the start on the initial page load like:

```
$(document).ready(function() {
    $('.progress .progress-bar').progressbar({
        transition_delay: 1500
    });
});
```

### refresh\_speed

[](#refresh_speed)

Is the time in milliseconds which will elapse between every text refresh, `aria-valuenow` attribute update and `update` callback call.

### display\_text

[](#display_text)

Determines if and where to display text on the progressbar. Possible options:

- `none` **no text**
- `fill` **text on filled bar**
- `center` **text on center** *(this mode changes css / html due to styling requirements)*

### use\_percentage

[](#use_percentage)

If text will be displayed - this option determines whether to show the percentage value or the amount.

So if `use_percentage` is false and `aria-valuemin` and `aria-valuemax` are not set (or to `0` and `100`) the value will be the same but `amount_format` will be used to format the result.

Example:

``

with `use_percentage: true` is the final text: `75%`

with `use_percentage: false` is the final text: `75 / 100`

### percent\_format

[](#percent_format)

Is a function which returns the text format for progressbar with `use_percentage: true`.

It takes 1 argument which is the current percent value.

### amount\_format

[](#amount_format)

Is a function which returns the text format for progressbar with `use_percentage: false`.

It takes 3 argument which are the current-, the max- and the min-amount.

### update

[](#update)

Is a callback function which will be called while the progressbar is transitioning ;)

Depends on `refresh_speed`.

It takes 2 argument which is the current percent value and a reference to the attached progressbar element.

### done

[](#done)

Is a callback function which will be called when the transition process is done.

It takes 1 argument which is a reference to the attached progressbar element.

### fail

[](#fail)

Is a callback function which will be called when an error occurs.

It takes 1 argument which is the error message.

Customisation
-------------

[](#customisation)

### alignment

[](#alignment)

- to use a horizontal progressbar which is align to the right you have to add `right` to the `progress` element.

    ```

    ```
- to use a vertical progressbar you have to add `vertical` to the `progress` element.

    ```

    ```
- to use a vertical progressbar which is align to the bottom you have to add `vertical` and `bottom` to the `progress` element.

    ```

    ```

### animation

[](#animation)

to change the animation itself you have to overwrite either less or css

1. horizontal

    - less

        ```
        .progress .bar {
            .transition(width 2s ease-in-out);
        }
        ```
    - scss

        ```
        .progress.vertical .progress-bar {
            @include transition(width 2s ease-in-out);
        }
        ```
    - css

        ```
        .progress .bar {
            -webkit-transition: width 2s ease-in-out;
            -moz-transition: width 2s ease-in-out;
            -ms-transition: width 2s ease-in-out;
            -o-transition: width 2s ease-in-out;
            transition: width 2s ease-in-out;
        }
        ```
2. vertical

    - less

        ```
        .progress.vertical .bar {
            .transition(height 2s ease-in-out);
        }
        ```
    - scss

        ```
        .progress.vertical .bar {
            @include transition(height 2s ease-in-out);
        }
        ```
    - css

        ```
        .progress.vertical .bar {
            -webkit-transition: height 2s ease-in-out;
            -moz-transition: height 2s ease-in-out;
            -ms-transition: height 2s ease-in-out;
            -o-transition: height 2s ease-in-out;
            transition: height 2s ease-in-out;
        }
        ```

Known Problems
--------------

[](#known-problems)

- Looks like iOS Safari is flooring the width of the transition. So if you want to display text with a correct value you have to use a full bar width **greater or equal 100px**.

Copyright and license
---------------------

[](#copyright-and-license)

Copyright 2013-2015 Stephan Groß, under [MIT license](https://github.com/minddust/bootstrap-progressbar/blob/master/LICENSE).

Want to appreciate my work? [minddust at Gittip](https://www.gittip.com/minddust/)

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1809d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4b333bd44a2f7f526cc29a59b2945b27c7d2f31df68b92c2eb46efbddc032483?d=identicon)[gaomingcode](/maintainers/gaomingcode)

---

Top Contributors

[![minddust](https://avatars.githubusercontent.com/u/1268978?v=4)](https://github.com/minddust "minddust (98 commits)")[![gaomingcode](https://avatars.githubusercontent.com/u/53959161?v=4)](https://github.com/gaomingcode "gaomingcode (8 commits)")[![shehi](https://avatars.githubusercontent.com/u/653569?v=4)](https://github.com/shehi "shehi (2 commits)")[![HaNdTriX](https://avatars.githubusercontent.com/u/1265681?v=4)](https://github.com/HaNdTriX "HaNdTriX (1 commits)")[![konieczkow](https://avatars.githubusercontent.com/u/581399?v=4)](https://github.com/konieczkow "konieczkow (1 commits)")[![visitsb](https://avatars.githubusercontent.com/u/2672835?v=4)](https://github.com/visitsb "visitsb (1 commits)")

---

Tags

bootstrapprogressbar

### Embed Badge

![Health badge](/badges/gaomingcode-bootstrapprogressbar/health.svg)

```
[![Health](https://phpackages.com/badges/gaomingcode-bootstrapprogressbar/health.svg)](https://phpackages.com/packages/gaomingcode-bootstrapprogressbar)
```

###  Alternatives

[kartik-v/bootstrap-star-rating

A simple yet powerful JQuery star rating plugin for Bootstrap.

1.1k4.5M5](/packages/kartik-v-bootstrap-star-rating)[kartik-v/yii2-editable

An enhanced editable widget for Yii 2.0 that allows easy editing of displayed data with numerous configuration possibilities.

1163.2M59](/packages/kartik-v-yii2-editable)[kartik-v/yii2-date-range

An advanced Yii 2 date range picker input for based on bootstrap-daterangepicker plugin.

894.4M42](/packages/kartik-v-yii2-date-range)[kartik-v/yii2-dialog

An asset bundle for bootstrap3-dialog for Yii 2.0 framework.

496.2M18](/packages/kartik-v-yii2-dialog)[kartik-v/yii2-widget-rating

A Yii2 widget for the simple yet powerful bootstrap-star-rating plugin with fractional rating support (sub repo split from yii2-widgets)

444.1M8](/packages/kartik-v-yii2-widget-rating)[kartik-v/yii2-widget-timepicker

Enhanced Yii2 wrapper for the bootstrap timepicker plugin (sub repo split from yii2-widgets)

404.9M14](/packages/kartik-v-yii2-widget-timepicker)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
