Home/Tools/Animations/Skeleton Loader Generator
Animations · Generator

Skeleton Loader Generator

Create skeleton loading placeholders for better UX.

Skeleton Type

Appearance

1.5s
8px

Preview

Generated CSS
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, #e5e7eb 0%, #f3f4f6 50%, #e5e7eb 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* Usage */
.skeleton-text {
  height: 16px;
  width: 100%;
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.skeleton-image {
  width: 100%;
  height: 150px;
}
100%
Free, no
sign-up needed
0
Code written
by hand
85+
CSS tools
in one place
<1s
Copy-ready
CSS instantly
What is this

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.

How to use

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.

1

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.

2

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.

3

Copy CSS and HTML

Click Copy to get the skeleton classes and a sample HTML structure. Replace with your actual component structure.

The output

What the generated code looks like

Clean, production-ready CSS — no vendor bloat, no unnecessary declarations.

styles.css
.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.

Copy & paste

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.

styles.css
.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.

styles.css
<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 & fixes

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

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.

FAQ

Frequently asked questions

Use a skeleton when you know the shape of the content that is loading (cards, lists, profiles) — it reduces perceived wait time and layout shift. Use a spinner for short, shapeless actions such as submitting a form.
A spinner communicates that something is loading with no information about what. A skeleton loader shows a placeholder that approximates the shape and layout of the real content. Skeletons are preferred for content-heavy pages (feeds, cards, tables) because they reduce perceived load time.
No. Everything runs in your browser. Nothing is sent to a server.

From the blog

Read more →