Skip to the page content

Progress

Bars, rings and steps that show how far along a job is.

Bootstrap reference

14 progress types

Basic bar

Bootstrap's .progress as it ships, colored with the background utilities. Each bar has an aria-label, because there is no text inside to read.

Bar
Sculpted Shoulder Blazer25%
Leather Trench Coat50%
Bar Loafers60%
Shield Sunglasses75%
Two-Tone Oxfords90%
Show code
<div class="progress" role="progressbar" aria-label="Leather Trench Coat stock"
     aria-valuenow="50" aria-valuemin="0" aria-valuemax="100">
  <div class="progress-bar bg-success w-50"></div>
</div>
<!-- Colors: none (primary), bg-success, bg-info, bg-warning, bg-danger -->

Bar with label

Bootstrap's bar with its value written in. Inside the bar needs a taller track, and the fill leans darker there so the label stays readable in every palette.

Bar

Label inside

64%

Label above

Spring tune-up bookings128 of 200

Label beside

38%
Show code
<div class="progress pg-height-label" role="progressbar" aria-label="Spring tune-up bookings"
     aria-valuenow="64" aria-valuemin="0" aria-valuemax="100">
  <div class="progress-bar w-64">64%</div>
</div>

Bar height

Bootstrap sets the height on .progress itself, with a style or --bs-progress-height. Thin bars suit tables and lists; thick ones leave room for a label.

Bar
4px
10px, the default here
16px
24px, room for a label
70%
Show code
<div class="progress pg-height-xs" role="progressbar" aria-label="Upload"
     aria-valuenow="70" aria-valuemin="0" aria-valuemax="100">
  <div class="progress-bar w-70"></div>
</div>
<!-- Or set it for a whole group: .my-list .progress { --bs-progress-height: 4px; } -->

Striped bar

Stripes from .progress-bar-striped, set moving with .progress-bar-animated. Keep the moving kind for work that is really happening.

Bar
Printing labels40%
Packing orders65%
Show code
<div class="progress" role="progressbar" aria-label="Packing orders"
     aria-valuenow="65" aria-valuemin="0" aria-valuemax="100">
  <div class="progress-bar progress-bar-striped progress-bar-animated bg-success w-65"></div>
</div>

Stacked bar

Bootstrap's .progress-stacked holds one .progress per part, so each part has its own width and label for screen readers. Fills here use the chart colors.

Bar
Today's visits312 visits across 46 crews
  • Regular 42%
  • One-off 23%
  • First visits 21%
  • Check-ins 14%
Show code
<div class="progress-stacked">
  <div class="progress w-42" role="progressbar" aria-label="Regular"
       aria-valuenow="42" aria-valuemin="0" aria-valuemax="100">
    <div class="progress-bar"></div>
  </div>
  <div class="progress w-23" role="progressbar" aria-label="One-off"
       aria-valuenow="23" aria-valuemin="0" aria-valuemax="100">
    <div class="progress-bar bg-success"></div>
  </div>
</div>

Indeterminate bar

For a job whose length isn't known yet. The bar slides instead of filling and leaves out aria-valuenow, so screen readers call it busy. Once there is a figure, it becomes an ordinary bar.

Bar

Checking stock in all three shops…

Show code
<!-- No aria-valuenow: screen readers treat the bar as busy, not as a number -->
<div class="progress progress-indeterminate" role="progressbar"
     aria-label="Stock check" aria-valuemin="0" aria-valuemax="100">
  <div class="progress-bar"></div>
</div>

Segmented bar

A bar in equal blocks, for things you count rather than measure: stamps on a loyalty card, stages of an order. Each block fills on its own.

Bar
Loyalty card7 of 10 stamps
Order #4817Packed, waiting for the courier
Show code
<div class="basalt-segments basalt-segments-lg" role="progressbar" aria-label="Loyalty card"
     aria-valuenow="7" aria-valuemin="0" aria-valuemax="10" aria-valuetext="7 of 10 stamps">
  <span class="basalt-segments-block is-on"></span>
  <!-- …one block per stamp; filled ones get is-on -->
  <span class="basalt-segments-block"></span>
</div>

<!-- Tone: basalt-segments-success, or set --segments-tone. Named stages: -->
<ol class="basalt-segments-labels" aria-hidden="true">
  <li class="is-on">Paid</li><li class="is-on">Packed</li><li>Shipped</li><li>Delivered</li>
</ol>

Bar with target

A bar with a line where the target sits. The track runs a quarter past the target, so a result that beats it has room to show, and the bar turns green once the target is met.

Bar
Clothing78% of target
$9.4k soldTarget $12k
Accessories108% of target · target met
$6.5k soldTarget $6k
Services37% of target
$1.1k soldTarget $3k
Show code
<!-- --target: where the line sits (80 leaves a quarter of room past it)
     --value: the result on the same scale. Add is-met once it's reached. -->
<div class="basalt-progress-goal is-met value-87 target-80">
  <div class="basalt-progress-goal-track" role="progressbar" aria-label="Accessories"
       aria-valuenow="108" aria-valuemin="0" aria-valuemax="125"
       aria-valuetext="$6.5k sold, 108% of the $6k target">
    <div class="basalt-progress-goal-bar"></div>
    <span class="basalt-progress-goal-mark"></span>
  </div>
  <div class="basalt-progress-goal-foot">
    <span>$6.5k sold</span>
    <span class="basalt-progress-goal-flag">Target $6k</span>
  </div>
</div>

File progress list

Several files on their way up, each with its size, speed and time left on a stock Bootstrap bar. Pause, cancel or retry any one of them while the ring adds up the whole batch. One file drops its connection on purpose, so the error state shows.

Bar

Uploading 5 files

0.0 of 96.0 MB

  • service-agreement.pdfWaiting · 2.4 MB
  • shop-window-proof.pngWaiting · 6.8 MB
  • new-starter-training.mp4Waiting · 58.0 MB
  • autumn-price-list.xlsxWaiting · 1.3 MB
  • site-photos.zipWaiting · 27.5 MB

Show code
<div class="basalt-file-queue">
  <div class="basalt-file-queue-summary">
    <div class="basalt-ring value-44" role="img" aria-label="Batch 44% uploaded">…</div>
    <div class="basalt-file-queue-headline">
      <p class="basalt-file-queue-title">Uploading 5 files</p>
      <p class="basalt-file-queue-sub">42.1 of 96.0 MB · about 9 s left</p>
    </div>
  </div>
  <ul class="basalt-file-queue-list" aria-label="Files">
    <!-- States: is-queued, is-paused, is-done, is-error -->
    <li class="basalt-file-queue-item">
      <span class="basalt-file-queue-icon" aria-hidden="true"><i class="bi bi-file-earmark-pdf"></i></span>
      <div class="basalt-file-queue-main">
        <div class="basalt-file-queue-line">
          <span class="basalt-file-queue-name">service-agreement.pdf</span>
          <span class="basalt-file-queue-meta">1.2 of 2.4 MB · 2 s left</span>
        </div>
        <div class="progress" role="progressbar" aria-label="service-agreement.pdf"
             aria-valuenow="50" aria-valuemin="0" aria-valuemax="100">
          <div class="progress-bar w-50"></div>
        </div>
      </div>
      <div class="basalt-file-queue-actions">
        <button type="button" class="basalt-file-queue-btn" aria-label="Pause service-agreement.pdf"><i class="bi bi-pause-fill"></i></button>
        <button type="button" class="basalt-file-queue-btn" aria-label="Cancel service-agreement.pdf"><i class="bi bi-x-lg"></i></button>
      </div>
    </li>
  </ul>
</div>

Progress ring

The ring from the shared stylesheet. Set --value from 0 to 100 and put any text in the middle. Drag the slider to watch it move; the small rings show the tone classes.

Ring

144 of 200 pieces sold

Orders packed
Stock left
Storage used
Survey answered
Show code
<div class="basalt-ring value-72" role="img" aria-label="72% of the monthly goal">
  <svg viewBox="0 0 120 120" aria-hidden="true">
    <!-- A full circle drawn as a path, so pathLength is valid SVG -->
    <path class="basalt-ring-track" d="M112 60 A52 52 0 1 1 8 60 A52 52 0 1 1 112 60" pathLength="100"/>
    <path class="basalt-ring-bar" d="M112 60 A52 52 0 1 1 8 60 A52 52 0 1 1 112 60" pathLength="100"/>
  </svg>
  <span class="basalt-ring-label">
    <span class="basalt-ring-value">72%</span>
    <span class="basalt-ring-caption">of monthly goal</span>
  </span>
</div>
<!-- Tones: basalt-ring-success, --warning, --danger. Smaller: basalt-ring-sm,
     or set --size and --thickness yourself. -->

Gauge

A half ring with calm, busy and full zones, and a needle that swings to the value. The number underneath is plain text, so it reads the same without the drawing.

Ring
68%of delivery slots booked on Tuesday · Busy
Show code
<figure class="basalt-gauge value-68">
  <svg viewBox="0 0 200 112" aria-hidden="true">
    <!-- One arc per zone: dash lengths are percentages of the half ring -->
    <path class="basalt-gauge-zone basalt-gauge-zone-low"  d="M20 100 A80 80 0 0 1 180 100" pathLength="100" stroke-dasharray="59 200"/>
    <path class="basalt-gauge-zone basalt-gauge-zone-mid"  d="M20 100 A80 80 0 0 1 180 100" pathLength="100" stroke-dasharray="0 61 23 200"/>
    <path class="basalt-gauge-zone basalt-gauge-zone-high" d="M20 100 A80 80 0 0 1 180 100" pathLength="100" stroke-dasharray="0 86 14 200"/>
    <g class="basalt-gauge-needle">
      <line x1="100" y1="100" x2="100" y2="34"/>
      <circle cx="100" cy="100" r="9"/>
      <circle class="basalt-gauge-hub" cx="100" cy="100" r="3.5"/>
    </g>
  </svg>
  <figcaption class="basalt-gauge-read">
    <span class="basalt-gauge-value">68%</span>
    <span class="basalt-gauge-caption">of delivery slots booked</span>
  </figcaption>
</figure>

Concentric rings

Three goals in one figure, one ring each, in the chart colors. Switch the period and they redraw; pick a goal in the legend to bring its ring forward.

Ring
Show code
<div class="basalt-rings">
  <svg viewBox="0 0 120 120" role="img" aria-label="Shop clothing 82%, add-ons 64%, new accounts 45%">
    <g class="tone-series-1">
      <circle class="basalt-rings-track" cx="60" cy="60" r="54"/>
      <path class="basalt-rings-bar value-82" d="M114 60 A54 54 0 1 1 6 60 A54 54 0 1 1 114 60" pathLength="100"/>
    </g>
    <g class="tone-series-2">
      <circle class="basalt-rings-track" cx="60" cy="60" r="42"/>
      <path class="basalt-rings-bar value-64" d="M102 60 A42 42 0 1 1 18 60 A42 42 0 1 1 102 60" pathLength="100"/>
    </g>
    <g class="tone-series-3">
      <circle class="basalt-rings-track" cx="60" cy="60" r="30"/>
      <path class="basalt-rings-bar value-45" d="M90 60 A30 30 0 1 1 30 60 A30 30 0 1 1 90 60" pathLength="100"/>
    </g>
  </svg>
  <div class="basalt-rings-center">
    <span class="basalt-rings-value">64%</span>
    <span class="basalt-rings-caption">on average</span>
  </div>
</div>

Checklist progress

A setup list with a count and a bar on top. Check the boxes and the bar keeps up; finish them all and it says so. The boxes are Bootstrap checkboxes.

Steps

Get your workspace ready

3 of 6 done

Everything is set. Your workspace is ready.

Show code
<div class="basalt-checklist">
  <div class="basalt-checklist-head">
    <p class="basalt-checklist-title" id="setup-title">Get your workspace ready</p>
    <p class="basalt-checklist-count" aria-live="polite">3 of 6 done</p>
    <div class="progress" role="progressbar" aria-labelledby="setup-title"
         aria-valuenow="50" aria-valuemin="0" aria-valuemax="100">
      <div class="progress-bar w-50"></div>
    </div>
  </div>
  <ul class="basalt-checklist-list">
    <li class="basalt-checklist-item is-done">
      <div class="form-check">
        <input class="form-check-input" type="checkbox" id="task-1" checked>
        <label class="form-check-label" for="task-1">
          <span>Upload your logo</span>
          <span class="basalt-checklist-hint">Shown on invoices and estimates</span>
        </label>
      </div>
    </li>
  </ul>
  <!-- Shown once the list has is-complete -->
  <p class="basalt-checklist-done">Everything is set.</p>
</div>

Stepped progress

Numbered steps joined by a line that fills as each one is finished. The current step carries aria-current="step", and when there is less than 34rem of room the row turns into a vertical list. Underneath, the same progress as a compact bar.

Steps
  1. Basket3 items, done
  2. DeliveryTuesday, 9 to 12, done
  3. PaymentCard or PayPal, current step
  4. ReviewCheck the order, not started
  5. ConfirmedOn its way, not started

Step 3 of 5: Payment

The same steps as a compact bar

3 of 5 · Payment
Show code
<div class="basalt-steps">
  <ol class="basalt-steps-list" aria-label="Checkout steps">
    <li class="basalt-steps-item is-done">
      <span class="basalt-steps-dot" aria-hidden="true">
        <i class="bi bi-check-lg"></i><span class="basalt-steps-num">1</span>
      </span>
      <span class="basalt-steps-text">
        <span class="basalt-steps-label">Basket</span>
        <span class="basalt-steps-hint">3 items</span>
        <span class="visually-hidden">, done</span>
      </span>
    </li>
    <li class="basalt-steps-item is-current" aria-current="step">…</li>
    <li class="basalt-steps-item">…</li>
  </ol>
</div>

<!-- Compact version -->
<div class="basalt-segments" role="progressbar" aria-label="Checkout"
     aria-valuenow="2" aria-valuemin="0" aria-valuemax="5">
  <span class="basalt-segments-block is-on"></span>
  <span class="basalt-segments-block is-on"></span>
  <span class="basalt-segments-block"></span>
  <span class="basalt-segments-block"></span>
  <span class="basalt-segments-block"></span>
</div>