Skeleton loading placeholder

Gray blocks with a moving shine while data loads.

CSS · Skeleton loading placeholderIntermediate
.skeleton {
  border-radius: 6px;
  background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}
.skeleton.line { height: 1em; margin: 0.5em 0; }
.skeleton.avatar { width: 48px; height: 48px; border-radius: 50%; }

@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
skeletonloadingshimmeranimation