2016-09-11 11:00:49 +00:00
|
|
|
---
|
2017-10-09 08:10:12 +00:00
|
|
|
title: Progress Bar
|
2024-03-21 16:11:54 +00:00
|
|
|
layout: docs
|
|
|
|
theme: library
|
2016-09-11 11:00:49 +00:00
|
|
|
doc-tab: elements
|
|
|
|
doc-subtab: progress
|
2018-04-09 13:15:31 +00:00
|
|
|
breadcrumb:
|
2024-03-21 16:11:54 +00:00
|
|
|
- home
|
|
|
|
- documentation
|
|
|
|
- elements
|
|
|
|
- elements-progress
|
2018-04-09 13:15:31 +00:00
|
|
|
meta:
|
|
|
|
colors: true
|
|
|
|
sizes: true
|
|
|
|
variables: true
|
2016-09-11 11:00:49 +00:00
|
|
|
---
|
2017-07-29 12:02:00 +00:00
|
|
|
{% capture progress %}
|
|
|
|
<progress class="progress" value="15" max="100">15%</progress>
|
|
|
|
{% endcapture %}
|
2018-10-08 01:32:48 +00:00
|
|
|
{% capture progress_indeterminate %}
|
|
|
|
<progress class="progress is-small is-primary" max="100">15%</progress>
|
|
|
|
<progress class="progress is-danger" max="100">30%</progress>
|
|
|
|
<progress class="progress is-medium is-dark" max="100">45%</progress>
|
|
|
|
<progress class="progress is-large is-info" max="100">60%</progress>
|
|
|
|
{% endcapture %}
|
|
|
|
|
2019-10-13 17:51:12 +00:00
|
|
|
<div class="content">
|
|
|
|
<p>
|
2024-03-21 16:11:54 +00:00
|
|
|
The Bulma progress bar is a simple CSS class that styles the native
|
|
|
|
<a
|
|
|
|
href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress"
|
|
|
|
target="_blank"
|
|
|
|
><code><progress></code> HTML element</a
|
|
|
|
>.
|
2019-10-13 17:51:12 +00:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
2024-03-21 16:11:54 +00:00
|
|
|
{% include docs/elements/snippet.html content=progress %}
|
|
|
|
{% include docs/elements/anchor.html name="Colors" %}
|
2016-09-11 11:00:49 +00:00
|
|
|
|
2019-10-13 17:51:12 +00:00
|
|
|
<div class="content">
|
|
|
|
<p>
|
2024-03-21 16:11:54 +00:00
|
|
|
The progress bar element is available in all the
|
|
|
|
<strong>different colors</strong> defined by the
|
|
|
|
<a href="{{ site.data.links.by_id.customize-variables.path }}"><code>$colors</code> Sass map</a>.
|
2019-10-13 17:51:12 +00:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
2021-01-27 23:30:42 +00:00
|
|
|
{% for color in site.data.colors.justColors %}
|
2024-03-21 16:11:54 +00:00
|
|
|
{% capture foobar %} {% assign n
|
|
|
|
= forloop.index | times: 15 %}
|
|
|
|
<progress class="progress is-{{ color }}" value="{{ n }}" max="100">
|
|
|
|
{{ n }}%
|
|
|
|
</progress>
|
2021-01-27 23:30:42 +00:00
|
|
|
{% endcapture %}
|
2024-03-21 16:11:54 +00:00
|
|
|
{% include docs/elements/snippet.html content=foobar %}
|
2021-01-27 23:30:42 +00:00
|
|
|
{% endfor %}
|
2024-03-21 16:11:54 +00:00
|
|
|
{% include docs/elements/anchor.html name="Sizes" %}
|
2021-01-27 23:30:42 +00:00
|
|
|
{% for size in site.data.sizes %}
|
2024-03-21 16:11:54 +00:00
|
|
|
{% capture foobar %} {% assign n = forloop.index | times: 20
|
|
|
|
%}
|
|
|
|
<progress class="progress is-{{ size }}" value="{{ n }}" max="100">
|
|
|
|
{{ n }}%
|
|
|
|
</progress>
|
2021-01-27 23:30:42 +00:00
|
|
|
{% endcapture %}
|
2024-03-21 16:11:54 +00:00
|
|
|
{% include docs/elements/snippet.html content=foobar %}
|
2021-01-27 23:30:42 +00:00
|
|
|
{% endfor %}
|
2024-03-21 16:11:54 +00:00
|
|
|
{% include docs/elements/anchor.html name="Indeterminate" %}
|
2018-10-08 01:32:48 +00:00
|
|
|
|
2018-10-28 14:45:28 +00:00
|
|
|
<div class="content">
|
|
|
|
<p>
|
2024-03-21 16:11:54 +00:00
|
|
|
If you don't set the HTML <code>value</code> attribute, you can display an <strong>indeterminate</strong> progress
|
|
|
|
bar. It's used to show that some progress is going on, but the total duration is not yet determined.
|
2018-10-28 14:45:28 +00:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
2024-03-21 16:11:54 +00:00
|
|
|
{% include docs/elements/snippet.html content=progress_indeterminate %}
|
2018-10-08 01:32:48 +00:00
|
|
|
|