Components
Skeleton
A shimmering placeholder while content loads. Use the shapes — or put .skeleton on your real markup and it keeps the exact size of each element.
Monthly revenue
$412,890 so far this year
$48,210
<!-- Shapes -->
<div class="skeleton-circle"></div>
<div class="skeleton-text"></div><div class="skeleton-text"></div> <!-- the last line is shorter -->
<div class="skeleton h-24"></div>
<!-- Your real markup, while loading -->
<div class="card" aria-busy="true">
<h3 class="card-title skeleton">Monthly revenue</h3>
<button class="btn skeleton">Export</button>
</div>
- Real markup —
.skeletonon any element hides its content but keeps its size and shape, so the page doesn't jump when the data arrives. Remove the class when it's loaded. - Shapes —
.skeleton(a block: give it a height),.skeleton-text(a line of text),.skeleton-circle(an avatar;--mo-skeleton-size). - Pulse —
.skeleton-pulseon a skeleton or a parent fades instead of shimmering. With reduced motion, skeletons stay still. - Accessibility — put
aria-busy="true"on the area that's loading.
A list while loading
<div class="flex gap-3 items-center">
<div class="skeleton-circle"></div>
<div class="flex-1">
<div class="skeleton-text w-1/2"></div>
<div class="skeleton-text w-1/3"></div>
</div>
</div>
Pulse
A gentle fade instead of a shimmer — .skeleton-pulse on any parent.
<div class="skeleton-pulse grid grid-cols-1 gap-2 max-w-sm">
<div class="skeleton h-24"></div>
<div class="skeleton-text"></div>
<div class="skeleton-text"></div>
</div>