# Loading Dots Button

> A pill button that shows three bouncing dots after its label while a request is pending.

- Category: [CSS Buttons](https://copy-css.com/category/buttons)
- Tags: three dots, pending, aria-busy, submit, sending
- Live preview: https://copy-css.com/snippets/loading-dots-button
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<button class="btn-dots" aria-busy="true">
  Sending
  <span class="btn-dots-anim" aria-hidden="true"><span></span><span></span><span></span></span>
</button>
```

## CSS

```css
.btn-dots {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border: 0;
  border-radius: 999px;
  background: #18181b;
  color: #fff;
  font: 600 16px/1 system-ui, sans-serif;
  cursor: pointer;
}

.btn-dots-anim {
  display: none;
  gap: 4px;
}

.btn-dots[aria-busy="true"] {
  cursor: progress;
}

.btn-dots[aria-busy="true"] .btn-dots-anim {
  display: inline-flex;
}

.btn-dots-anim span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: btn-dots-bounce 1s ease-in-out infinite;
}

.btn-dots-anim span:nth-child(2) {
  animation-delay: 0.15s;
}

.btn-dots-anim span:nth-child(3) {
  animation-delay: 0.3s;
}

.btn-dots:focus-visible {
  outline: 3px solid #18181b;
  outline-offset: 3px;
}

@keyframes btn-dots-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-5px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .btn-dots-anim span { animation: none; }
}
```

## Notes

- This CSS Loading Dots Button is 55 lines of pure CSS (1.0 KB) with no JavaScript and no dependencies. It uses keyframe animations, transforms, Flexbox and keyboard focus styles.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
