mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-16 18:44:01 +02:00
Add v5.3.0 docs (#38658)
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="Documentation and examples for using Bootstrap custom progress bars featuring support for stacked bars, animated backgrounds, and text labels.">
|
||||
<meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
|
||||
<meta name="generator" content="Hugo 0.111.3">
|
||||
<meta name="generator" content="Hugo 0.112.5">
|
||||
|
||||
<meta name="docsearch:language" content="en">
|
||||
<meta name="docsearch:version" content="5.3">
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@3">
|
||||
|
||||
<link href="/docs/5.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
|
||||
<link href="/docs/5.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous">
|
||||
|
||||
<link href="/docs/5.3/assets/css/docs.css" rel="stylesheet">
|
||||
|
||||
@@ -531,7 +531,7 @@
|
||||
<main class="bd-main order-1">
|
||||
<div class="bd-intro pt-2 ps-lg-2">
|
||||
<div class="d-md-flex flex-md-row-reverse align-items-center justify-content-between">
|
||||
<div class="mb-3 mb-md-0 d-flex text-nowrap"><a class="btn btn-sm btn-bd-light rounded-2" href="https://github.com/twbs/bootstrap/blob/v5.3.0-alpha3/site/content/docs/5.3/components/progress.md" title="View and edit this file on GitHub" target="_blank" rel="noopener">
|
||||
<div class="mb-3 mb-md-0 d-flex text-nowrap"><a class="btn btn-sm btn-bd-light rounded-2" href="https://github.com/twbs/bootstrap/blob/v5.3.0/site/content/docs/5.3/components/progress.md" title="View and edit this file on GitHub" target="_blank" rel="noopener">
|
||||
View on GitHub
|
||||
</a>
|
||||
</div>
|
||||
@@ -595,7 +595,7 @@
|
||||
<li>We provide a special <code>.progress-stacked</code> class to create multiple/stacked progress bars.</li>
|
||||
</ul>
|
||||
<p>Put that all together, and you have the following examples.</p>
|
||||
<div class="bd-example-snippet bd-code-snippet"><div class="bd-example">
|
||||
<div class="bd-example-snippet bd-code-snippet"><div class="bd-example m-0 border-0">
|
||||
<div class="progress" role="progressbar" aria-label="Basic example" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">
|
||||
<div class="progress-bar" style="width: 0%"></div>
|
||||
</div>
|
||||
@@ -640,7 +640,7 @@
|
||||
<h2 id="bar-sizing">Bar sizing <a class="anchor-link" href="#bar-sizing" aria-label="Link to this section: Bar sizing"></a></h2>
|
||||
<h3 id="width">Width <a class="anchor-link" href="#width" aria-label="Link to this section: Width"></a></h3>
|
||||
<p>Bootstrap provides a handful of <a href="/docs/5.3/utilities/sizing/">utilities for setting width</a>. Depending on your needs, these may help with quickly configuring the width of the <code>.progress-bar</code>.</p>
|
||||
<div class="bd-example-snippet bd-code-snippet"><div class="bd-example">
|
||||
<div class="bd-example-snippet bd-code-snippet"><div class="bd-example m-0 border-0">
|
||||
<div class="progress" role="progressbar" aria-label="Basic example" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100">
|
||||
<div class="progress-bar w-75"></div>
|
||||
</div>
|
||||
@@ -660,7 +660,7 @@
|
||||
|
||||
<h3 id="height">Height <a class="anchor-link" href="#height" aria-label="Link to this section: Height"></a></h3>
|
||||
<p>You only set a <code>height</code> value on the <code>.progress</code> container, so if you change that value, the inner <code>.progress-bar</code> will automatically resize accordingly.</p>
|
||||
<div class="bd-example-snippet bd-code-snippet"><div class="bd-example">
|
||||
<div class="bd-example-snippet bd-code-snippet"><div class="bd-example m-0 border-0">
|
||||
<div class="progress" role="progressbar" aria-label="Example 1px high" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100" style="height: 1px">
|
||||
<div class="progress-bar" style="width: 25%"></div>
|
||||
</div>
|
||||
@@ -686,7 +686,7 @@
|
||||
|
||||
<h2 id="labels">Labels <a class="anchor-link" href="#labels" aria-label="Link to this section: Labels"></a></h2>
|
||||
<p>Add labels to your progress bars by placing text within the <code>.progress-bar</code>.</p>
|
||||
<div class="bd-example-snippet bd-code-snippet"><div class="bd-example">
|
||||
<div class="bd-example-snippet bd-code-snippet"><div class="bd-example m-0 border-0">
|
||||
<div class="progress" role="progressbar" aria-label="Example with label" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100">
|
||||
<div class="progress-bar" style="width: 25%">25%</div>
|
||||
</div>
|
||||
@@ -705,7 +705,7 @@
|
||||
</span></span><span class="line"><span class="cl"><span class="p"></</span><span class="nt">div</span><span class="p">></span></span></span></code></pre></div></div>
|
||||
|
||||
<p>Note that by default, the content inside the <code>.progress-bar</code> is controlled with <code>overflow: hidden</code>, so it doesn’t bleed out of the bar. If your progress bar is shorter than its label, the content will be capped and may become unreadable. To change this behavior, you can use <code>.overflow-visible</code> from the <a href="/docs/5.3/utilities/overflow/">overflow utilities</a>, but make sure to also define an explicit <a href="/docs/5.3/utilities/colors/#colors">text color</a> so the text remains readable. Be aware though that currently this approach does not take into account <a href="/docs/5.3/customize/color-modes/">color modes</a>.</p>
|
||||
<div class="bd-example-snippet bd-code-snippet"><div class="bd-example">
|
||||
<div class="bd-example-snippet bd-code-snippet"><div class="bd-example m-0 border-0">
|
||||
<div class="progress" role="progressbar" aria-label="Example with label" aria-valuenow="10" aria-valuemin="0" aria-valuemax="100">
|
||||
<div class="progress-bar overflow-visible text-dark" style="width: 10%">Long label text for the progress bar, set to a dark color</div>
|
||||
</div>
|
||||
@@ -725,7 +725,7 @@
|
||||
|
||||
<h2 id="backgrounds">Backgrounds <a class="anchor-link" href="#backgrounds" aria-label="Link to this section: Backgrounds"></a></h2>
|
||||
<p>Use background utility classes to change the appearance of individual progress bars.</p>
|
||||
<div class="bd-example-snippet bd-code-snippet"><div class="bd-example">
|
||||
<div class="bd-example-snippet bd-code-snippet"><div class="bd-example m-0 border-0">
|
||||
<div class="progress" role="progressbar" aria-label="Success example" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100">
|
||||
<div class="progress-bar bg-success" style="width: 25%"></div>
|
||||
</div>
|
||||
@@ -766,7 +766,7 @@
|
||||
</div>
|
||||
|
||||
<p>If you’re adding labels to progress bars with a custom background color, make sure to also set an appropriate <a href="/docs/5.3/utilities/colors/#colors">text color</a>, so the labels remain readable and have sufficient contrast.</p>
|
||||
<div class="bd-example-snippet bd-code-snippet"><div class="bd-example">
|
||||
<div class="bd-example-snippet bd-code-snippet"><div class="bd-example m-0 border-0">
|
||||
<div class="progress" role="progressbar" aria-label="Success example" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100">
|
||||
<div class="progress-bar bg-success" style="width: 25%">25%</div>
|
||||
</div>
|
||||
@@ -803,7 +803,7 @@
|
||||
</span></span><span class="line"><span class="cl"><span class="p"></</span><span class="nt">div</span><span class="p">></span></span></span></code></pre></div></div>
|
||||
|
||||
<p>Alternatively, you can use the new combined <a href="/docs/5.3/helpers/color-background/">color and background</a> helper classes.</p>
|
||||
<div class="bd-example-snippet bd-code-snippet"><div class="bd-example">
|
||||
<div class="bd-example-snippet bd-code-snippet"><div class="bd-example m-0 border-0">
|
||||
<div class="progress" role="progressbar" aria-label="Warning example" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100">
|
||||
<div class="progress-bar text-bg-warning" style="width: 75%">75%</div>
|
||||
</div>
|
||||
@@ -823,7 +823,7 @@
|
||||
|
||||
<h2 id="multiple-bars">Multiple bars <a class="anchor-link" href="#multiple-bars" aria-label="Link to this section: Multiple bars"></a></h2>
|
||||
<p>You can include multiple progress components inside a container with <code>.progress-stacked</code> to create a single stacked progress bar. Note that in this case, the styling to set the visual width of the progress bar <em>must</em> be applied to the <code>.progress</code> elements, rather than the <code>.progress-bar</code>s.</p>
|
||||
<div class="bd-example-snippet bd-code-snippet"><div class="bd-example">
|
||||
<div class="bd-example-snippet bd-code-snippet"><div class="bd-example m-0 border-0">
|
||||
<div class="progress-stacked">
|
||||
<div class="progress" role="progressbar" aria-label="Segment one" aria-valuenow="15" aria-valuemin="0" aria-valuemax="100" style="width: 15%">
|
||||
<div class="progress-bar"></div>
|
||||
@@ -859,7 +859,7 @@
|
||||
|
||||
<h2 id="striped">Striped <a class="anchor-link" href="#striped" aria-label="Link to this section: Striped"></a></h2>
|
||||
<p>Add <code>.progress-bar-striped</code> to any <code>.progress-bar</code> to apply a stripe via CSS gradient over the progress bar’s background color.</p>
|
||||
<div class="bd-example-snippet bd-code-snippet"><div class="bd-example">
|
||||
<div class="bd-example-snippet bd-code-snippet"><div class="bd-example m-0 border-0">
|
||||
<div class="progress" role="progressbar" aria-label="Default striped example" aria-valuenow="10" aria-valuemin="0" aria-valuemax="100">
|
||||
<div class="progress-bar progress-bar-striped" style="width: 10%"></div>
|
||||
</div>
|
||||
@@ -903,7 +903,7 @@
|
||||
|
||||
<h2 id="animated-stripes">Animated stripes <a class="anchor-link" href="#animated-stripes" aria-label="Link to this section: Animated stripes"></a></h2>
|
||||
<p>The striped gradient can also be animated. Add <code>.progress-bar-animated</code> to <code>.progress-bar</code> to animate the stripes right to left via CSS3 animations.</p>
|
||||
<div class="bd-example-snippet bd-code-snippet"><div class="bd-example">
|
||||
<div class="bd-example-snippet bd-code-snippet"><div class="bd-example m-0 border-0">
|
||||
<div class="progress" role="progressbar" aria-label="Animated striped example" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100">
|
||||
<div class="progress-bar progress-bar-striped progress-bar-animated" style="width: 75%"></div>
|
||||
</div>
|
||||
@@ -926,9 +926,9 @@
|
||||
<small class="d-inline-flex mb-3 px-2 py-1 fw-semibold text-success-emphasis bg-success-subtle border border-success-subtle rounded-2">Added in v5.2.0</small>
|
||||
|
||||
<p>As part of Bootstrap’s evolving CSS variables approach, progress bars now use local CSS variables on <code>.progress</code> for enhanced real-time customization. Values for the CSS variables are set via Sass, so Sass customization is still supported, too.</p>
|
||||
<div class="bd-example-snippet bd-code-snippet bd-scss-docs">
|
||||
<div class="bd-example-snippet bd-code-snippet bd-file-ref">
|
||||
<div class="d-flex align-items-center highlight-toolbar ps-3 pe-2 py-1 border-bottom">
|
||||
<a class="font-monospace link-secondary link-underline-secondary link-underline-opacity-0 link-underline-opacity-100-hover small" href="https://github.com/twbs/bootstrap/blob/v5.3.0-alpha3/scss/_progress.scss">scss/_progress.scss</a>
|
||||
<a class="font-monospace link-secondary link-underline-secondary link-underline-opacity-0 link-underline-opacity-100-hover small" href="https://github.com/twbs/bootstrap/blob/v5.3.0/scss/_progress.scss">scss/_progress.scss</a>
|
||||
<div class="d-flex ms-auto">
|
||||
<button type="button" class="btn-clipboard mt-0 me-0" title="Copy to clipboard">
|
||||
<svg class="bi" aria-hidden="true"><use xlink:href="#clipboard"/></svg>
|
||||
@@ -943,9 +943,9 @@
|
||||
</span></span><span class="line"><span class="cl"><span class="na">--#{$prefix}progress-bar-bg</span><span class="o">:</span> <span class="si">#{</span><span class="nv">$progress-bar-bg</span><span class="si">}</span><span class="p">;</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="na">--#{$prefix}progress-bar-transition</span><span class="o">:</span> <span class="si">#{</span><span class="nv">$progress-bar-transition</span><span class="si">}</span><span class="p">;</span></span></span></code></pre></div></div>
|
||||
<h3 id="sass-variables">Sass variables <a class="anchor-link" href="#sass-variables" aria-label="Link to this section: Sass variables"></a></h3>
|
||||
<div class="bd-example-snippet bd-code-snippet bd-scss-docs">
|
||||
<div class="bd-example-snippet bd-code-snippet bd-file-ref">
|
||||
<div class="d-flex align-items-center highlight-toolbar ps-3 pe-2 py-1 border-bottom">
|
||||
<a class="font-monospace link-secondary link-underline-secondary link-underline-opacity-0 link-underline-opacity-100-hover small" href="https://github.com/twbs/bootstrap/blob/v5.3.0-alpha3/scss/_variables.scss">scss/_variables.scss</a>
|
||||
<a class="font-monospace link-secondary link-underline-secondary link-underline-opacity-0 link-underline-opacity-100-hover small" href="https://github.com/twbs/bootstrap/blob/v5.3.0/scss/_variables.scss">scss/_variables.scss</a>
|
||||
<div class="d-flex ms-auto">
|
||||
<button type="button" class="btn-clipboard mt-0 me-0" title="Copy to clipboard">
|
||||
<svg class="bi" aria-hidden="true"><use xlink:href="#clipboard"/></svg>
|
||||
@@ -963,9 +963,9 @@
|
||||
</span></span></code></pre></div></div>
|
||||
<h3 id="keyframes">Keyframes <a class="anchor-link" href="#keyframes" aria-label="Link to this section: Keyframes"></a></h3>
|
||||
<p>Used for creating the CSS animations for <code>.progress-bar-animated</code>. Included in <code>scss/_progress-bar.scss</code>.</p>
|
||||
<div class="bd-example-snippet bd-code-snippet bd-scss-docs">
|
||||
<div class="bd-example-snippet bd-code-snippet bd-file-ref">
|
||||
<div class="d-flex align-items-center highlight-toolbar ps-3 pe-2 py-1 border-bottom">
|
||||
<a class="font-monospace link-secondary link-underline-secondary link-underline-opacity-0 link-underline-opacity-100-hover small" href="https://github.com/twbs/bootstrap/blob/v5.3.0-alpha3/scss/_progress.scss">scss/_progress.scss</a>
|
||||
<a class="font-monospace link-secondary link-underline-secondary link-underline-opacity-0 link-underline-opacity-100-hover small" href="https://github.com/twbs/bootstrap/blob/v5.3.0/scss/_progress.scss">scss/_progress.scss</a>
|
||||
<div class="d-flex ms-auto">
|
||||
<button type="button" class="btn-clipboard mt-0 me-0" title="Copy to clipboard">
|
||||
<svg class="bi" aria-hidden="true"><use xlink:href="#clipboard"/></svg>
|
||||
@@ -994,7 +994,7 @@
|
||||
<ul class="list-unstyled small">
|
||||
<li class="mb-2">Designed and built with all the love in the world by the <a href="/docs/5.3/about/team/">Bootstrap team</a> with the help of <a href="https://github.com/twbs/bootstrap/graphs/contributors">our contributors</a>.</li>
|
||||
<li class="mb-2">Code licensed <a href="https://github.com/twbs/bootstrap/blob/main/LICENSE" target="_blank" rel="license noopener">MIT</a>, docs <a href="https://creativecommons.org/licenses/by/3.0/" target="_blank" rel="license noopener">CC BY 3.0</a>.</li>
|
||||
<li class="mb-2">Currently v5.3.0-alpha3.</li>
|
||||
<li class="mb-2">Currently v5.3.0.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-6 col-lg-2 offset-lg-1 mb-3">
|
||||
@@ -1043,7 +1043,7 @@
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="/docs/5.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe" crossorigin="anonymous"></script>
|
||||
<script src="/docs/5.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/@docsearch/js@3"></script>
|
||||
@@ -1071,10 +1071,10 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.3.0-alpha3\/dist\/css\/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.3.0\/dist\/css\/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https://getbootstrap.com/docs/5.3/assets/css/docs.css" rel="stylesheet">
|
||||
<title>Bootstrap Example</title>
|
||||
<${'script'} src="https:\/\/cdn\.jsdelivr\.net\/npm\/bootstrap@5\.3\.0\-alpha3\/dist\/js\/bootstrap\.bundle\.min\.js"></${'script'}>
|
||||
<${'script'} src="https:\/\/cdn\.jsdelivr\.net\/npm\/bootstrap@5\.3\.0\/dist\/js\/bootstrap\.bundle\.min\.js"></${'script'}>
|
||||
</head>
|
||||
<body class="p-3 m-0 border-0 ${classes}">
|
||||
|
||||
|
Reference in New Issue
Block a user