| name | loading-skeleton |
| description | Generate shimmer loading skeleton placeholders for content areas. |
Loading Skeleton Component
.skeleton {
background: linear-gradient(
90deg,
rgba(255, 255, 255, 0.04) 25%,
rgba(255, 255, 255, 0.08) 50%,
rgba(255, 255, 255, 0.04) 75%
);
background-size: 200% 100%;
animation: shimmer 1.5s infinite;
border-radius: 8px;
}
@keyframes shimmer {
0% { background-position: 200% 0; }
100% { background-position: -200% 0; }
}
.skeleton-text {
height: 14px;
margin-bottom: 8px;
width: 100%;
}
.skeleton-title {
height: 24px;
margin-bottom: 12px;
width: 60%;
}
.skeleton-avatar {
width: 48px;
height: 48px;
border-radius: 50%;
}
.skeleton-card {
padding: 20px;
border-radius: 16px;
background: rgba(255, 255, 255, 0.02);
border: 1px solid rgba(255, 255, 255, 0.04);
}
Rules:
- Match the shape of the content being loaded
- Use the same border-radius as the real element
- Keep animation subtle — don't distract
- Reduce motion for
prefers-reduced-motion