# Hourglass Loader

> A minimal hourglass made of two border triangles whose sand drains before it flips over.

- Category: [CSS Loaders & Spinners](https://copy-css.com/category/loaders)
- Tags: sand, waiting, flip, border triangles, timer
- Live preview: https://copy-css.com/snippets/hourglass-loader
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

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

## CSS

```css
.loader-hourglass {
  width: 0;
  height: 0;
  border: 22px solid transparent;
  border-top-color: #b45309;
  border-bottom-color: #fde68a;
  animation: loader-hourglass-flip 2s ease-in-out infinite;
}

/* Sand drains from top to bottom, then the glass turns over */
@keyframes loader-hourglass-flip {
  0% {
    border-top-color: #b45309;
    border-bottom-color: #fde68a;
    transform: rotate(0);
  }
  75% {
    border-top-color: #fde68a;
    border-bottom-color: #b45309;
    transform: rotate(0);
  }
  100% {
    border-top-color: #fde68a;
    border-bottom-color: #b45309;
    transform: rotate(180deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .loader-hourglass { animation-duration: 4s; }
}
```

## Notes

- This CSS Hourglass Loader is 31 lines of pure CSS (0.7 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.
