What is the CSS Skeleton Loader Generator?
Generate animated skeleton loading placeholders that match your layout. Customize dimensions, border radius, and shimmer animation, then copy the CSS.
Everything runs locally in your browser. Adjust the controls above, preview instantly, and copy clean, production-ready CSS — no account, no upload.
Using the CSS Skeleton Loader Generator
Everything lives in the panel at the top of this page. There is nothing to install — it all runs right here in your browser.
Define your layout skeleton
Use the visual builder to draw rectangles representing your text lines, images, and buttons. Set width, height, and border-radius for each block.
Configure the shimmer animation
Set the shimmer colour, speed, and direction. A 1.2-1.8s shimmer is comfortable. Faster reads as loading; slower reads as broken.
Copy CSS and HTML
Click Copy to get the skeleton classes and a sample HTML structure. Replace with your actual component structure.
What the generated code looks like
Clean, production-ready CSS — no vendor bloat, no unnecessary declarations.
.skeleton {
background: #e2e8f0;
border-radius: 4px;
overflow: hidden;
position: relative;
}
.skeleton::after {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(
90deg,
transparent 0%,
rgba(255, 255, 255, 0.6) 50%,
transparent 100%
);
animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
from { transform: translateX(-100%); }
to { transform: translateX(100%); }
}
/* Usage */
.skeleton-title { width: 60%; height: 24px; }
.skeleton-text { width: 100%; height: 16px; }
.skeleton-avatar { width: 48px; height: 48px; border-radius: 50%; }Match skeleton dimensions as closely as possible to your real content to prevent layout shift when the data loads.
Ready-to-use CSS patterns
Drop any of these straight into your project — no modifications needed.
Shimmer with a single gradient
Animate background-position on one element — no extra DOM nodes for the highlight.
.skeleton {
background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 37%, #e5e7eb 63%);
background-size: 400% 100%;
animation: shimmer 1.4s ease infinite;
border-radius: 8px;
}
@keyframes shimmer { from { background-position: 100% 50%; } to { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }Accessible loading region
Tell assistive technology the area is busy and hide the decorative placeholders.
<section aria-busy="true" aria-live="polite"> <div class="skeleton" style="height:20px;width:60%" aria-hidden="true"></div> <div class="skeleton" style="height:14px;width:90%" aria-hidden="true"></div> <span class="sr-only">Loading articles…</span> </section>
Common mistakes & how to fix them
A few habits trip people up. Here is what to watch for — and the exact fix.
Skeleton that does not match the real layout
If placeholder sizes differ from the loaded content, the page jumps when data arrives (layout shift).
Fix: Give skeleton blocks the same dimensions, spacing and aspect ratios as the final content.
Skeletons for very fast responses
Flashing a skeleton for 100ms looks like a glitch.
Fix: Delay showing the skeleton by about 200–300ms, or skip it for requests that are almost always instant.
Pro tips for better results
Match real content dimensions as closely as possible
The skeleton should predict the loaded content dimensions. A skeleton that matches prevents cumulative layout shift (CLS) when real data loads - a Core Web Vitals metric.
Use a grey lighter than your content background
#e2e8f0 (Tailwind slate-200) works for white backgrounds. On dark backgrounds, use a slightly lighter shade than the surface. High contrast skeleton colours look jarring.
Show skeleton for loads over 300ms, not for instant data
If data loads in under 300ms (cached API, local state), skip the skeleton entirely. Flashing a skeleton and immediately replacing it is more disorienting than a brief blank state.
Skeleton loaders perform better than spinners for content-heavy pages
A spinner gives no information about what is coming. A skeleton that approximates the content layout reduces perceived wait time because the user can already understand the page structure.
Frequently asked questions
From the blog
Read more →CSS Animations: A Practical Guide to Keyframes and Transitions (2026)
Learn the difference between transitions and keyframe animations, how to write @keyframes, the properties worth animating for 60fps, and easing that actually looks good.
CSS clamp() and Fluid Typography: Stop Writing Font-Size Media Queries (2026)
Learn how CSS clamp() creates type that scales smoothly between screen sizes with a single line, the formula behind it, and how to build a fully fluid type scale without media queries.
The Complete Guide to CSS Gradients (2026)
Master linear, radial, and conic CSS gradients. Learn color stops, angles, hard stops for stripes, multi-layer gradients, and the tricks behind smooth, professional results.