12 CSS Skeleton Loaders

Image Card

A 16:9 image placeholder topped with a title and two body lines — the "feed item" template every social and blog UI ships with.

Pure CSS MIT licensed

Image Card the 4th of 12 designs in the 12 CSS Skeleton Loaders collection. The design is implemented in pure CSS — no JavaScript required. Copy the HTML and CSS panels below into your project. Because the demo is pure CSS, it works in any framework or templating engine you happen to use. The design honours prefers-reduced-motion and uses real semantic markup, so it ships accessibility-ready out of the box.

Live preview

Open in playground

The code

<div class="sk-card">
  <div class="sk-card-img"></div>
  <div class="sk-card-title"></div>
  <div class="sk-card-line" style="width: 95%"></div>
  <div class="sk-card-line" style="width: 75%"></div>
</div>
.sk-card {
  width: 220px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  background: #15151b;
}
.sk-card-img,
.sk-card-title,
.sk-card-line {
  background: linear-gradient(90deg, #1f1f28 0%, #2a2a36 50%, #1f1f28 100%);
  background-size: 200% 100%;
  animation: skShimmer 1.6s linear infinite;
  border-radius: 6px;
}
.sk-card-img {
  aspect-ratio: 16 / 9;
  margin-bottom: 4px;
}
.sk-card-title {
  height: 14px;
  width: 70%;
}
.sk-card-line {
  height: 9px;
}
@keyframes skShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sk-card,
  .sk-card * {
    animation: none !important;
  }
}

Search CodeFronts

Loading…