aboutsummaryrefslogtreecommitdiff
path: root/docs/4.0/components/progress.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/4.0/components/progress.md')
-rw-r--r--docs/4.0/components/progress.md35
1 files changed, 21 insertions, 14 deletions
diff --git a/docs/4.0/components/progress.md b/docs/4.0/components/progress.md
index 95de22ba2..e342b06d9 100644
--- a/docs/4.0/components/progress.md
+++ b/docs/4.0/components/progress.md
@@ -17,7 +17,7 @@ Progress components are built with two HTML elements, some CSS to set the width,
Put that all together, and you have the following examples.
-{% example html %}
+{% capture example %}
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
</div>
@@ -33,44 +33,48 @@ Put that all together, and you have the following examples.
<div class="progress">
<div class="progress-bar" role="progressbar" style="width: 100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
</div>
-{% endexample %}
+{% endcapture %}
+{% include example.html content=example %}
Bootstrap provides a handful of [utilities for setting width]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/sizing/). Depending on your needs, these may help with quickly configuring progress.
-{% example html %}
+{% capture example %}
<div class="progress">
<div class="progress-bar w-75" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100"></div>
</div>
-{% endexample %}
+{% endcapture %}
+{% include example.html content=example %}
## Labels
Add labels to your progress bars by placing text within the `.progress-bar`.
-{% example html %}
+{% capture example %}
<div class="progress">
<div class="progress-bar" role="progressbar" style="width: 25%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100">25%</div>
</div>
-{% endexample %}
+{% endcapture %}
+{% include example.html content=example %}
## Height
We only set a `height` value on the `.progress`, so if you change that value the inner `.progress-bar` will automatically resize accordingly.
-{% example html %}
+{% capture example %}
<div class="progress" style="height: 1px;">
<div class="progress-bar" role="progressbar" style="width: 25%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="progress" style="height: 20px;">
<div class="progress-bar" role="progressbar" style="width: 25%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
</div>
-{% endexample %}
+{% endcapture %}
+{% include example.html content=example %}
## Backgrounds
Use background utility classes to change the appearance of individual progress bars.
-{% example html %}
+{% capture example %}
<div class="progress">
<div class="progress-bar bg-success" role="progressbar" style="width: 25%" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
</div>
@@ -83,25 +87,27 @@ Use background utility classes to change the appearance of individual progress b
<div class="progress">
<div class="progress-bar bg-danger" role="progressbar" style="width: 100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
</div>
-{% endexample %}
+{% endcapture %}
+{% include example.html content=example %}
## Multiple bars
Include multiple progress bars in a progress component if you need.
-{% example html %}
+{% capture example %}
<div class="progress">
<div class="progress-bar" role="progressbar" style="width: 15%" aria-valuenow="15" aria-valuemin="0" aria-valuemax="100"></div>
<div class="progress-bar bg-success" role="progressbar" style="width: 30%" aria-valuenow="30" aria-valuemin="0" aria-valuemax="100"></div>
<div class="progress-bar bg-info" role="progressbar" style="width: 20%" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100"></div>
</div>
-{% endexample %}
+{% endcapture %}
+{% include example.html content=example %}
## Striped
Add `.progress-bar-striped` to any `.progress-bar` to apply a stripe via CSS gradient over the progress bar's background color.
-{% example html %}
+{% capture example %}
<div class="progress">
<div class="progress-bar progress-bar-striped" role="progressbar" style="width: 10%" aria-valuenow="10" aria-valuemin="0" aria-valuemax="100"></div>
</div>
@@ -117,7 +123,8 @@ Add `.progress-bar-striped` to any `.progress-bar` to apply a stripe via CSS gra
<div class="progress">
<div class="progress-bar progress-bar-striped bg-danger" role="progressbar" style="width: 100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
</div>
-{% endexample %}
+{% endcapture %}
+{% include example.html content=example %}
## Animated stripes