# Bouncing Ball Loader

> A ball that bounces with a squash on landing and a shadow that grows as it falls.

- Category: [CSS Loaders & Spinners](https://copy-css.com/category/loaders)
- Tags: bounce, squash, shadow, physics, playful
- Live preview: https://copy-css.com/snippets/bouncing-ball-loader
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<div class="loader-ball" role="status" aria-label="Loading"></div>
```

## CSS

```css
.loader-ball {
  position: relative;
  width: 40px;
  height: 84px;
}

.loader-ball::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ea580c;
  transform-origin: 50% 100%;
  animation: loader-ball-bounce 0.5s cubic-bezier(0.5, 0, 1, 0.5) infinite alternate;
}

.loader-ball::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 6px;
  width: 28px;
  height: 6px;
  border-radius: 50%;
  background: #7c2d1240;
  animation: loader-ball-shadow 0.5s cubic-bezier(0.5, 0, 1, 0.5) infinite alternate;
}

@keyframes loader-ball-bounce {
  0% { transform: translateY(0); }
  85% { transform: translateY(54px) scale(1, 1); }
  100% { transform: translateY(54px) scale(1.2, 0.8); }
}

@keyframes loader-ball-shadow {
  from { transform: scale(0.5); opacity: 0.4; }
  to { transform: scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .loader-ball::before,
  .loader-ball::after { animation-duration: 1.2s; }
}
```

## Notes

- This CSS Bouncing Ball Loader is 46 lines of pure CSS (1.0 KB) with no JavaScript and no dependencies. It uses keyframe animations, transforms and reduced-motion support.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
