Introduction Modules Flavors Customization Github

mini.css

v2.0

Progress

The progress module gives you full control over the presentation of progress and loading on your pages. Apart from progress bars and color variants for them, spinner elements are provided to help communicate that something is loading.

All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.

Quick overview

Progress indicators are very common UI elements for almost any website and web app, as they help communicate vital information such as the fact that a process is being executed in the background, informing the user that they should wait for it to complete before proceeding. The progress module provides you with two essential tools to communicate this information: the <progress> HTML element, which is pre-styled and compatible with modern browsers to help you communicate information about the percentage of a task and the .spinner-donut class that allows you to create an animated spinner that communicates that something is loading currently and will continue doing so for an indefinite amount of time. Both elements come with their own color and size variants and are fully accessible.


Quick start

To use the progress module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <head> to utilize the viewport meta tag:


<meta name="viewport" content="width=device-width, initial-scale=1">

Basic Progress Bar

Process is 0% complete!

Process is 45% complete!

Process is 100% complete!

To create a progress bar, use the <progress> HTML element, specify the preset maximum of max="1000" and set a value between 0 and 1000. Update your <progress> element using some Javascript code, by changing its value to any integer in the same range.

Sample code

<progress value="0" max="1000"></progress>
<progress value="450" max="1000"></progress>
<progress value="1000" max="1000"></progress>

Notes

  • We made sure that the <progress> element displays properly on all modern browsers, using browser-specific rules. However, there might be some irregularities with older browsers, especially legacy versions of Internet Explorer.
  • If the preset max="1000" does not suit your needs, you should check the customization page for instructions on how to set your own maximum value for the <progress> element.

<progress value="80" max="100"></progress>

Don't: Avoid using different values for the <progress> element's max, except for the preset one (1000).

<progress value="450.5" max="1000.0"></progress>

Don't: Try not to use floating point values for either the <progress> element's value or max. During testing of the module, we found that floating point values could cause unexpected behavior.

Progress Bar variants

Sample code


              

Notes


Do: 

Don't: 

Basic Donut Spinner

Sample code


              

Notes


Do: 

Don't: 

Donut Spinner variants

Sample code


              

Notes


Do: 

Don't: 

If you want to learn more about mini.css's modules, go back to the modules page and choose another module to see its documentation.