Add

Lorem ipsum

Lorem ipsum

Design

6 views

5 min

How to add a skeleton loader in Webflow

Learn how to add a skeleton loader in Webflow to improve perceived speed with a CSS shimmer animation.

In this tutorial, Sandro, co-founder of the Gemeos Webflow agency, shows you how to add a skeleton loader in Webflow to improve the perception of loading speed.

Example

Image loaded ✓

The content is now loaded. The skeleton loader is gone and makes way for the card's real content.

CSS propertyValueRole
backgroundlinear-gradient shimmerAnimated shimmer effect
border-radius4px or 50%Adapted to the content (text or avatar)
animationshimmer 1.5s infiniteSweep animation

1. Create the skeleton elements in Webflow

Create Divs that match the size and layout of your real content. Give them the skeleton class. These elements will be visible while the page loads, then hidden once the content is ready.

2. Add the CSS animation in an embed

@keyframes shimmer {
0% { background-position: -200% 0; }
100% { background-position: 200% 0; }
}
.skeleton {
background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
background-size: 200% 100%;
animation: shimmer 1.5s infinite;
border-radius: 4px;
}

3. Hide the skeletons once the content has loaded

window.addEventListener('load', function() {
document.querySelectorAll('.skeleton').forEach(function(el) {
el.style.display = 'none';
});
document.querySelectorAll('.real-content').forEach(function(el) {
el.style.display = 'block';
});
});

good to know

The skeleton loader is more effective than a spinner because it gives users a sense of the structure of the content to come, reducing waiting anxiety. For Webflow sites with a strong PageSpeed score, the 'load' event fires very quickly: the skeleton is only visible for a few hundred milliseconds, which is enough to create the perceived effect.

Conclusion

The skeleton loader improves the perception of speed without changing actual performance. Use cases:

  • CMS collection cards loaded dynamically
  • Images in lazy load
  • Content injected via API or embed

Published on

Let’s f*****G GO !!

Ready to launch
Your business?

Alexandre

Max

Enora

Bryan

Cannelle

Tiphaine

You'll :heart: our collaboration...