# Indeterminate Progress Bar

> A slim gradient progress bar that slides endlessly while content loads.

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

## HTML

```html
<div class="progress-bar" role="progressbar" aria-label="Loading"></div>
```

## CSS

```css
.progress-bar {
  position: relative;
  overflow: hidden;
  width: 220px;
  height: 6px;
  border-radius: 999px;
  background: #e5e7eb;
}

.progress-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 40%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6366f1, #ec4899);
  animation: progress-slide 1.2s ease-in-out infinite;
}

@keyframes progress-slide {
  from { transform: translateX(-100%); }
  to { transform: translateX(250%); }
}

@media (prefers-reduced-motion: reduce) {
  .progress-bar::before {
    animation-duration: 2.4s;
  }
}
```

## Notes

- This CSS Indeterminate Progress Bar is 29 lines of pure CSS (0.6 KB) with no JavaScript and no dependencies. It uses keyframe animations, transforms, linear gradients and reduced-motion support.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
