# Labeled Progress Bar

> A determinate progress bar with a title, percentage and caption, like a storage usage meter.

- Category: [CSS Loaders & Spinners](https://copy-css.com/category/loaders)
- Tags: determinate, storage, usage, percentage, quota
- Live preview: https://copy-css.com/snippets/labeled-progress-bar
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<div class="progress-labeled">
  <div class="progress-labeled-head"><span>Storage</span><span>72%</span></div>
  <div class="progress-labeled-track" style="--value: 72%" role="progressbar" aria-label="Storage used" aria-valuenow="72" aria-valuemin="0" aria-valuemax="100"></div>
  <small>36 GB of 50 GB used</small>
</div>
```

## CSS

```css
.progress-labeled {
  display: grid;
  gap: 8px;
  width: min(100%, 280px);
  color: #18181b;
  font: 14px/1.3 system-ui, sans-serif;
}

.progress-labeled-head {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.progress-labeled-track {
  --value: 0%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #ede9fe;
}

.progress-labeled-track::before {
  content: "";
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8b5cf6, #6d28d9);
  transition: width 0.4s ease;
}

.progress-labeled small {
  color: #71717a;
  font-size: 12px;
}
```

## Notes

- This CSS Labeled Progress Bar is 37 lines of pure CSS (0.7 KB) with no JavaScript and no dependencies. It uses transitions, linear gradients, CSS Grid and Flexbox.
- Customize with: `--value`.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
