PHPackages                             jazzsequence/progress-bar - 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. jazzsequence/progress-bar

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

jazzsequence/progress-bar
=========================

a simple progress bar shortcode that can be styled with CSS

2.2.4(1y ago)03[1 issues](https://github.com/jazzsequence/progress-bar/issues)GPLv2PHPCI passing

Since May 8Pushed 1y ago1 watchersCompare

[ Source](https://github.com/jazzsequence/progress-bar)[ Packagist](https://packagist.org/packages/jazzsequence/progress-bar)[ RSS](/packages/jazzsequence-progress-bar/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (2)Versions (7)Used By (0)

Progress Bar
============

[](#progress-bar)

[![GitHub release (latest SemVer)](https://camo.githubusercontent.com/2d0d32dc3287a2e0490c24396fe5c165b1f0dcea62a2cb9019ea45d48fbdea85/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6a617a7a73657175656e63652f70726f67726573732d626172)](https://camo.githubusercontent.com/2d0d32dc3287a2e0490c24396fe5c165b1f0dcea62a2cb9019ea45d48fbdea85/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6a617a7a73657175656e63652f70726f67726573732d626172) [![Test Status](https://camo.githubusercontent.com/cc04df6c58357839260a7c8112abab5da524f38578281a6b733c1cd3793b137a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a617a7a73657175656e63652f70726f67726573732d6261722f746573742e796d6c3f6c6162656c3d54657374253230537461747573)](https://github.com/jazzsequence/progress-bar/actions/workflows/test.yml) [![Lint Status](https://camo.githubusercontent.com/8cf2c79105e7f6924547a9da6d8544662ecd9fe32c381f4b914a6fed6136267e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a617a7a73657175656e63652f70726f67726573732d6261722f6c696e742e796d6c3f6c6162656c3d4c696e74)](https://github.com/jazzsequence/progress-bar/actions/workflows/lint.yml) [![Vulnerability Scan](https://camo.githubusercontent.com/cbc88120234ab0b0589a486d14b403177f33b9c72837ac8bda4fd59d3b8cad83/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a617a7a73657175656e63652f70726f67726573732d6261722f76756c6e2e796d6c3f6c6162656c3d56756c6e65726162696c6974792532305363616e)](https://github.com/jazzsequence/progress-bar/actions/workflows/vuln.yml)

[![Donate to this plugin!](https://camo.githubusercontent.com/90afc193336061e2c34e8d7cbbb065821b200d49b562ca016ddc2edcc368ebe2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f6e6174652d76696125323050617950616c2d626c75653f6c6f676f3d70617970616c266c6162656c436f6c6f723d626c7565)](https://paypal.me/jazzsequence)

A simple progress bar shortcode that can be styled with CSS

Description
-----------

[](#description)

This plugin does one thing: it creates a simple (but nice-looking) CSS3 progress bar that you can style with your own CSS and use wherever you want with a simple shortcode. Now with support for custom colors and gradients.

To add a progress bar to a post or a page, simply use this shortcode:

`[wppb progress=50]`

where "50" in the example above is a progress bar that is 50% complete. Simple, lightweight, cross-browser compatible (degrades nicely for browsers that don't support CSS3).

For more examples and full descriptions of all the available options, click on the [options tab](http://wordpress.org/extend/plugins/progress-bar/other_notes/).

For demos of each of the options, go here:

Options
-------

[](#options)

The following is a list of all the available shortcode options. These can be used in any combination. The only **required** parameter is **progress**. All parameters are case-sensitive (e.g. "progress" will work but "Progress" will not).

### `progress` (required)

[](#progress-required)

This determines how full the progress bar will be. Progress can be in 2 forms, either a number (0-100), in which case it will be interpreted as a percentage, or as a fraction (e.g. 25/100). Since 1.1, you can also use dollar signs (e.g. $63/$180), for example to create a fundraising progress bar. If using dollar signs, you only *need* to add a dollar sign to one or the other of the two values (e.g. 63/$180 or $63/180) -- the plugin will output either option the same ($63/$180). Your progress can go over, too (e.g. 150/100 or 123%), but your mileage may vary for the display. It's not recommended to use this with the **fullwidth** option, for example, because your progress will spill outside of your main body container.

*Examples*

`[wppb progress=50]` A progress bar that is 50% complete

`[wppb progress="50/100"]` A progress bar that is 50/100 complete

`[wppb progress="$45/$50"]` A dollar value progress bar that is $45/$50 complete

`[wppb progress=110]` A progress bar that has gone over 100%

`[wppb progress=150/100]` A progress bar that has exceeded its goal

`[wppb progress=$125/100]` A fundraising-style progress bar that has exceeded the goal

### `option`

[](#option)

This adds one of several supported options to the progress bar. For those that know CSS, new "options" can be added simply by adding new styles to your style.css. See the [Frequently Asked Questions](http://wordpress.org/support/plugin/progress-bar/faq/) page for more information on creating new CSS classes. Options can be combined by wrapping them in quotes in the shortcode. The progress bar will naturally have an inner shadow applied to it. The `flat` option was added to remove the shadow and display a "flat" color, best when used in conjunction with the `color` parameter.

Supported values: candystripe, animated-candystripe, red, orange, green, yellow, flat

*Examples*

`[wppb progress=50 option=red]` Displays a red progress bar

`[wppb progress=50 option="animated-candystripe green"]` Displays a green progress bar with an animated candystripe

`[wppb progress=50 option="candystripe orange"]` Displays an orange progress bar with a static candystripe

`[wppb progress=50 option=candystripe]` Displays a default progress bar (blue) with a static candystripe

`[wppb progress=50 option=flat color=red]` Displays a red progress bar with no inner shadow or gradient

`[wppb progress=50 option="flat candystripe" color=gray]` Displays a gray progress bar with no inner shadow or gradient and a static candystripe

### `location`

[](#location)

Displays the percentage, text or fraction either inside or outside the progress bar. *Note:* It is *not* recommended to use `location=after` if you are displaying a progress bar that exceeds its goal.

Supported values: inside, after

*Examples*

`[wppb progress=50 option=red location=after]` Displays a red progress bar with the progress displayed to the right of the progress bar.

`[wppb progress=50 option="red candystripe" location=inside]` Displays a red progress bar with a static candystripe and the progress displayed inside the progress bar.

`[wppb progress=85 location=after text="foo"]` Displays a progress bar with the text "foo" displayed after the progress bar.

### `text`

[](#text)

Displays arbitrary text instead of the progress bar. Can be used with the **location** parameter to define whether the text appears inside or outside the progress bar (default is inside). *Must* be used inside double quotes. HTML code is stripped from the final output.

Supported values: any plain text string

*Examples*

`[wppb progress=75 text="My awesome text"]` Displays "My awesome text" inside a 75% progress bar.

`[wppb progress=85 location=after text="foo"]` Displays "foo" after an 85% progress bar

`[wppb progress=85 location=inside text="hello!"]` Displays "hello!" inside an 85% progress bar (note, default location for text is inside, so it isn't required to specify "inside").

### `fullwidth`

[](#fullwidth)

Makes the progress bar take up 100% of the container. (Good for responsive layouts.) *Not* recommended for progress bars that exceed their goal. *Note:* `fullwidth` will actually take any value. If `fullwidth` is present at all, it will display a progress bar that is 100% wide. For example `fullwidth=foo` would output the same as `fullwidth=true`.

Supported value: true

*Examples*

`[wppb progress=50 fullwidth=true]` Displays a full-width (responsive) progress bar

`[wppb progress=50 fullwidth=foo]` Identical to the above progress bar

### `color`

[](#color)

Defines a color for the progress bar. This is useful for creating new progress bar colors on the fly without having to edit CSS. Cannot be used in conjunction with any of the pre-existing color options (red, yellow, orange or green).

Supported values: any hexadecimal color value, any rgb/rgba color value, any css-supported [color name](http://www.w3schools.com/cssref/css_colornames.asp)

*Examples*

`[wppb progress=50 color=rgb(123,50,87)]`

`[wppb progress=55 color=rgba(123,64,99,0.3)]`*Note:* Since the background color for the progress bar is dark gray, any opacity applied to the rgba color will make the color darker, since it's adding to the dark gray background.

`[wppb progress=22 color=#ff3257]`

`[wppb progress=68 color=lightYellow]`

### `endcolor`

[](#endcolor)

Defines an end color for a custom gradient when used with **color**.

Supported values: any hexadecimal color value, any rgb/rgba color value, any css-supported [color name](http://www.w3schools.com/cssref/css_colornames.asp)

*Examples*

`[wppb progress=72 color=turquoise endcolor=teal]`

`[wppb progress=83 color=#ff2222 endcolor=#ff9984]`

`[wppb progress=50 color=rgb(203,96,179) endcolor=rgb(173,18,131)]`

### `gradient`

[](#gradient)

Determines an end-color on the fly for a gradient based on the **color** parameter. As such, **gradient** *requires* **color** to be present, otherwise the color and gradient will be set to the default color (blue). Cannot be used in conjunction with any of the pre-existing color options (red, yellow, orange or green). When using `gradient` the **color** value *must* be in hexadecimal form.

Supported values: any positive or negative decimal value from 0.0 to 1.0 or -1.0.

*Examples*

`[wppb progress=22 color=#ff0000 gradient=0.2]` Displays a red progress bar that gets lighter at the bottom

`[wppb progress=22 color=#ff0000 gradient=-0.2]` Displays a red progress bar that gets darker at the bottom

**This does not work:**

`[wppb progress=34 color=rgb(22,18,99) gradient=0.2]`

Frequently Asked Questions
--------------------------

[](#frequently-asked-questions)

**How do I change the currency?**

WP Progress bar allows currencies in progress bars. By default, the supported currency symbol is $. However, since version 2.2, you can modify this in your environment by using the `wppb.currency_symbol` filter, e.g.:

```
add_filter( 'wppb.currency_symbol', 'my_custom_currency_symbol' );
function my_custom_currency_symbol( $symbol ) {
	return '£';
}
```

This code would allow-list the £ symbol for use in progress bars. You can also add support for multiple currency symbols in a similar way:

```
add_filter( 'wppb.currency_symbol', 'my_custom_currency_symbol' );
function my_custom_currency_symbol( $symbol ) {
	$allowed_symbols ### `[`
	if ( in_array( $symbol, $allowed_symbols ) ) {
		return $symbol;
	}

	return '$';
}
```

**How do I change the colors?**

You can change the colors via the css. Use `div.wppb-progress` to change the style of the container and `div.wppb-progress > span` to change the style of the bar itself. You can also change the candystripe and animated candystripe. See  for an excellent tutorial and  for a CSS gradient generator.

**No, really, how do I change the colors? I don't know much about CSS.**

Okay, here's a great example that's being used in the plugin CSS right now to create the 'red' option. Here's the CSS:

```
/* red */
div.wppb-progress > span.red {
	background: #d10418; /* Old browsers */
	background: -moz-linear-gradient(top, #d10418 0%, #6d0019 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#d10418), color-stop(100%,#6d0019)); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top, #d10418 0%,#6d0019 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top, #d10418 0%,#6d0019 100%); /* Opera 11.10+ */
	background: -ms-linear-gradient(top, #d10418 0%,#6d0019 100%); /* IE10+ */
	background: linear-gradient(top, #d10418 0%,#6d0019 100%); /* W3C */
}
```

You don't need to worry about the candystripes -- those will apply to your new option automatically. Using this example, you can change the hex values and create a new class (like span.green or span.orange or span.nyannyanrainbows) that you can use inside the shortcode. Want to see where I got those gradient values? Go here:

**What about placement of the percentage? Where's that?**

At the end of `wppb.css` you'll find the two classes for the percentage parameter:

```
/* after */
div.wppb-wrapper.after { width: 440px; }
div.wppb-wrapper.after div.wppb-progress { float: left; }
div.wppb-wrapper.after div.after { float: right; line-height: 25px; }

/* inside */
div.wppb-wrapper.inside { width: 400px; height: 25px; position: relative; }
div.wppb-wrapper div.inside { margin: 0 auto; line-height: 25px; color: #ffffff; font-weight: bold; position: absolute; z-index: 1; width: 400px; text-align: center; }
```

Position these however you want. If you wanted the percentage to be inside the progress bar but towards the end, you could do something like this:

```
/* right */
div.wppb-wrapper.right { width: 400px; height: 25px; position: relative; }
div.wppb-wrapper div.inside { margin: 0 auto; line-height: 25px; color: #ffffff; font-weight: bold; position: absolute; z-index: 1; width: 400px; text-align: right; padding-right: 10px }
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance47

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Every ~173 days

Total

5

Last Release

413d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/af6c0ce1d250a8a8edc57b4759dabc3d5f7956fc105450bba7fc5d2eb5b74362?d=identicon)[jazzsequence](/maintainers/jazzsequence)

---

Top Contributors

[![jazzsequence](https://avatars.githubusercontent.com/u/991511?v=4)](https://github.com/jazzsequence "jazzsequence (123 commits)")

---

Tags

shortcodewidgetwordpresswordpress-plugin

### Embed Badge

![Health badge](/badges/jazzsequence-progress-bar/health.svg)

```
[![Health](https://phpackages.com/badges/jazzsequence-progress-bar/health.svg)](https://phpackages.com/packages/jazzsequence-progress-bar)
```

###  Alternatives

[baibaratsky/yii2-serialized-attributes-behavior

Yii2 Serialized Attributes Behavior

1174.1k9](/packages/baibaratsky-yii2-serialized-attributes-behavior)

PHPackages © 2026

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