# Skeleton Card

> A card-shaped placeholder with an image, title and text lines, swept by a single shine layer.

- Category: [CSS Loaders & Spinners](https://copy-css.com/category/loaders)
- Tags: placeholder, shimmer, image, content loading, sweep
- Live preview: https://copy-css.com/snippets/skeleton-card
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<div class="skel-card" role="status" aria-label="Loading content">
  <div class="skel-card-media"></div>
  <div class="skel-card-line skel-card-title"></div>
  <div class="skel-card-line"></div>
  <div class="skel-card-line skel-card-short"></div>
</div>
```

## CSS

```css
.skel-card {
  position: relative;
  display: grid;
  gap: 8px;
  width: min(100%, 220px);
  padding: 12px;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 10px #0f172a12;
}

.skel-card-media {
  aspect-ratio: 2 / 1;
  border-radius: 10px;
  background: #e5e7eb;
}

.skel-card-line {
  height: 12px;
  border-radius: 6px;
  background: #e5e7eb;
}

.skel-card-title {
  width: 70%;
  height: 16px;
  margin-top: 4px;
}

.skel-card-short {
  width: 45%;
}

/* One shine layer sweeps across the whole card */
.skel-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, #fff0 20%, #ffffffb3 50%, #fff0 80%);
  transform: translateX(-100%);
  animation: skel-card-sweep 1.6s ease-in-out infinite;
}

@keyframes skel-card-sweep {
  to { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .skel-card::after { animation: none; }
}
```

## Notes

- This CSS Skeleton Card is 51 lines of pure CSS (0.9 KB) with no JavaScript and no dependencies. It uses keyframe animations, transforms, linear gradients and box shadows.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
