--- layout : 'default' css : 'progress' element : 'progress' elementType : 'module' title : 'Progress' description : 'A progress bar shows the progression of a task' type : 'UI Module' themes : ['Default', 'Classic', 'Basic', 'Striped'] --- <%- @partial('header', { tabs: { definition: 'Definition', usage: 'Usage' } }) %>

Types

Standard

A standard progress bar

Uploading Files

Indicating

An indicating progress bar visually indicates the current level of progress of a task

Funding

Content

Bar

A progress element can contain a bar to indicate the current level of progress

Current Progress

A progress bar can contain a reading of the current progress

Label

A progress element can contain a label

Uploading Files

States

Active

A progress bar can show activity

Uploading Files

Success

A progress bar can show a success state

Everything worked, your file is all ready.

Warning

A progress bar can show a warning state

Your file didn't meet the minimum resolution requirements.

Error

A progress bar can show an error state

There was an error.

Disabled

A progress bar can be disabled

Variations

Inverted

A progress bar can have its colors inverted

Uploading Files
Success
Warning
Error

Attached

A progress bar can show progress of an element

La la la la

Color

Can have different colors:

Initializing a progress bar

With metadata

A progress bar can be initialized with metadata

$('#example1').progress();
74% Funded

With javascript

A progress bar can be initialized with a javascript settings object

$('#example2').progress({ percent: 22 });
22% Earned

Task Completion Percent

Adding a total value

A progress bar can keep track of the current value as a ratio of a total value. This is useful for tracking the progress of a series of events with a known quantity, for example "uploading 1 of 20" photos.

Each call to increment will increase the value by 1, or the value specified as the second parameter

$('#example3') .progress('increment') ;
Adding Photos
$('#example3') .progress({ total: 3 }) ;

Initializing with metadata and using custom labels

A progress bar can keep track of the current value as a ratio of a total value. This is useful for tracking the progress of a series of events with a known quantity, for example "uploading 1 of 20" photos.

Each call to increment will increase the value by 1, or the value specified as the second parameter

In addition you can pass in templates text for each state available to your progress bar which will automatically be updated when your progress bar reaches that state

$('#example4') .progress('increment') ;
Adding Photos
$('#example4') .progress({ text: { active : 'Adding {value} of {total} photos', success : '{total} Photos Uploaded!' } }) ;

Alternate bar labels

Progress bar labels can be set to either a percentage or ratio with percentage being the default state. If you need to translate a progress bar label simply pass in a new templated value as the accompanying text.

The following example shows how to localize for Spanish.

$('#example5') .progress('increment') ;
Carga de archivos
$('#example5') .progress({ label: 'ratio', text: { ratio: '{value} de {total}' } }) ;