Profile Card Skeleton
Skeleton · Card · content, card
HTML
<div class="utw-loader-profile-card-skeleton" role="status"> <span class="utw-loader-profile-card-skeleton__avatar"></span> <span class="utw-loader-profile-card-skeleton__lines"><span class="utw-loader-profile-card-skeleton__line"></span><span class="utw-loader-profile-card-skeleton__line"></span><span class="utw-loader-profile-card-skeleton__line"></span></span> <span class="utw-loader-profile-card-skeleton__sr">Loading…</span> </div>
CSS
/* Skeleton loader (Card) */
.utw-loader-profile-card-skeleton {
box-sizing: border-box;
position: relative;
display: flex;
align-items: center;
gap: 16px;
width: 360px;
max-width: 100%;
}
.utw-loader-profile-card-skeleton *,
.utw-loader-profile-card-skeleton *::before,
.utw-loader-profile-card-skeleton *::after {
box-sizing: border-box;
}
.utw-loader-profile-card-skeleton__lines {
display: flex;
flex: 1;
flex-direction: column;
gap: 8px;
min-width: 0;
}
.utw-loader-profile-card-skeleton__line {
position: relative;
display: block;
height: 12px;
border-radius: 6px;
background: #e5e7eb;
overflow: hidden;
}
.utw-loader-profile-card-skeleton__line:nth-child(3) {
width: 60%;
}
.utw-loader-profile-card-skeleton__avatar {
position: relative;
flex: none;
width: 52px;
height: 52px;
border-radius: 50%;
background: #e5e7eb;
overflow: hidden;
}
.utw-loader-profile-card-skeleton__avatar::after,
.utw-loader-profile-card-skeleton__line::after {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(90deg, transparent, #f9fafb, transparent);
transform: translateX(-100%);
animation: utw-loader-profile-card-skeleton-shimmer 1.6s ease-in-out infinite;
}
.utw-loader-profile-card-skeleton__sr {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
@keyframes utw-loader-profile-card-skeleton-shimmer {
to {
transform: translateX(100%);
}
}
@keyframes utw-loader-profile-card-skeleton-calm {
from {
opacity: 1;
}
to {
opacity: 0.5;
}
}
@media (prefers-reduced-motion: reduce) {
.utw-loader-profile-card-skeleton *,
.utw-loader-profile-card-skeleton *::before,
.utw-loader-profile-card-skeleton *::after {
animation: none !important;
}
.utw-loader-profile-card-skeleton {
animation: utw-loader-profile-card-skeleton-calm 2s ease-in-out infinite alternate !important;
}
}